Package jahuwaldt.js.datareader
Class TextParam
- java.lang.Object
-
- jahuwaldt.js.datareader.DataParam
-
- jahuwaldt.js.datareader.TextParam
-
- All Implemented Interfaces:
DataElement,java.lang.Comparable<DataElement>
public final class TextParam extends DataParam
A class that represents a text/note parameter.Modified by: Joseph A. Huwaldt
- Version:
- February 23, 2025
- Author:
- Joseph A. Huwaldt, Date: March 5, 2003
-
-
Field Summary
-
Fields inherited from interface jahuwaldt.js.datareader.DataElement
RESOURCES
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Compares the specified object with this parameter for strict equality same text, same name, and same user data.javolution.text.TextgetText()Return the text of this text parameter.inthashCode()Returns the hash code for thisUnitParameter.static TextParamnewInstance(java.lang.CharSequence name)Returns a new, preallocated or recycledTextParaminstance (on the stack when executing in aStackContext) with the specified name and containing no text.static voidrecycle(TextParam instance)Recycles a parameter instance immediately (on the stack when executing in a StackContext).voidsetText(java.lang.CharSequence text)Change the text contained in this parameter.java.lang.StringtoString()Create a string representation of this parameter which consists of the parameter's name and text.javolution.text.TexttoText()Create a Text representation of this parameter which consists of the parameter's name and text.static TextParamvalueOf(java.lang.CharSequence name, java.lang.CharSequence text)Returns a text parameter with the specified name and text (which may be null).-
Methods inherited from class jahuwaldt.js.datareader.DataParam
compareTo, getName, getUserObject, setName, setUserObject
-
-
-
-
Method Detail
-
newInstance
public static TextParam newInstance(java.lang.CharSequence name)
Returns a new, preallocated or recycledTextParaminstance (on the stack when executing in aStackContext) with the specified name and containing no text.- Parameters:
name- The name to be assigned to this parameter (may not benull).- Returns:
- A new instance of this class with the specified name.
-
recycle
public static void recycle(TextParam instance)
Recycles a parameter instance immediately (on the stack when executing in a StackContext).- Parameters:
instance- The instance of this class to recycle.
-
valueOf
public static TextParam valueOf(java.lang.CharSequence name, java.lang.CharSequence text)
Returns a text parameter with the specified name and text (which may be null).- Parameters:
name- The name of the parameter.text- The text to be stored with this parameter.- Returns:
- A new instance of a text parameter with the specified name and text.
-
getText
public javolution.text.Text getText()
Return the text of this text parameter. Could return an empty string if there is no text.- Returns:
- The text of this text parameter
-
setText
public void setText(java.lang.CharSequence text)
Change the text contained in this parameter. The text can not be null.- Parameters:
text- The text to be stored in this parameter.
-
equals
public boolean equals(java.lang.Object obj)
Compares the specified object with this parameter for strict equality same text, same name, and same user data.
-
hashCode
public int hashCode()
Returns the hash code for thisUnitParameter.
-
toText
public javolution.text.Text toText()
Create a Text representation of this parameter which consists of the parameter's name and text.
-
-