Package jahuwaldt.js.datareader
Class DataParam
- java.lang.Object
-
- jahuwaldt.js.datareader.DataParam
-
- All Implemented Interfaces:
DataElement,java.lang.Comparable<DataElement>
- Direct Known Subclasses:
TextParam,UnitParameter
public abstract class DataParam extends java.lang.Object implements DataElement
A data parameter or variable in acaseor run.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 Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(DataElement otherElement)booleanequals(java.lang.Object obj)Compares the specified object with this parameter for strict equality, same value, same name, same user data.java.lang.CharSequencegetName()Return the name of this parameter.java.lang.ObjectgetUserObject()Return any user defined object associated with this data element.inthashCode()Returns the hash code for thisDataParam.voidsetName(java.lang.CharSequence name)Change the name of this parameter to the specified name (may not benull).voidsetUserObject(java.lang.Object data)Set the user defined object associated with this data element.java.lang.StringtoString()Create a String representation of this parameter which simply consists of the parameter's name.javolution.text.TexttoText()Create a Text representation of this parameter which simply consists of the parameter's name.
-
-
-
Method Detail
-
getName
public java.lang.CharSequence getName()
Return the name of this parameter.- Specified by:
getNamein interfaceDataElement- Returns:
- The name of this data element.
-
setName
public void setName(java.lang.CharSequence name)
Change the name of this parameter to the specified name (may not benull).- Specified by:
setNamein interfaceDataElement- Parameters:
name- The name of this data element.
-
getUserObject
public java.lang.Object getUserObject()
Return any user defined object associated with this data element. If there is no user data, thennullis returned.- Specified by:
getUserObjectin interfaceDataElement- Returns:
- The user defined object associated with this data element or null if there isn't any.
-
setUserObject
public void setUserObject(java.lang.Object data)
Set the user defined object associated with this data element. This can be used to store any type of information with a data element that could be useful. Storingnullfor no user object is fine.- Specified by:
setUserObjectin interfaceDataElement- Parameters:
data- The user data to associate with this element.
-
equals
public boolean equals(java.lang.Object obj)
Compares the specified object with this parameter for strict equality, same value, same name, same user data.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare with.- Returns:
trueif this parameter is identical to that parameter;falseotherwise.
-
hashCode
public int hashCode()
Returns the hash code for thisDataParam.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code value.
-
toText
public javolution.text.Text toText()
Create a Text representation of this parameter which simply consists of the parameter's name.- Returns:
- A Text representation of this parameter
-
toString
public java.lang.String toString()
Create a String representation of this parameter which simply consists of the parameter's name.- Overrides:
toStringin classjava.lang.Object- Returns:
- A String representation of this parameter
-
compareTo
public int compareTo(DataElement otherElement)
- Specified by:
compareToin interfacejava.lang.Comparable<DataElement>
-
-