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 acase
or run.Modified by: Joseph A. Huwaldt
- Version:
- October 15, 2015
- 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 int
compareTo(DataElement otherElement)
boolean
equals(java.lang.Object obj)
Compares the specified object with this parameter for strict equality, same value, same name, same user data.java.lang.CharSequence
getName()
Return the name of this parameter.java.lang.Object
getUserObject()
Return any user defined object associated with this data element.int
hashCode()
Returns the hash code for thisDataParam
.void
setName(java.lang.CharSequence name)
Change the name of this parameter to the specified name (may not benull
).void
setUserObject(java.lang.Object data)
Set the user defined object associated with this data element.java.lang.String
toString()
Create a string representation of this parameter which simply consists of the parameter's name.javolution.text.Text
toText()
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:
getName
in interfaceDataElement
-
setName
public void setName(java.lang.CharSequence name)
Change the name of this parameter to the specified name (may not benull
).- Specified by:
setName
in interfaceDataElement
-
getUserObject
public java.lang.Object getUserObject()
Return any user defined object associated with this data element. If there is no user data, thennull
is returned.- Specified by:
getUserObject
in interfaceDataElement
-
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. Storingnull
for no user object is fine.- Specified by:
setUserObject
in interfaceDataElement
-
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:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to compare with.- Returns:
true
if this parameter is identical to that parameter;false
otherwise.
-
hashCode
public int hashCode()
Returns the hash code for thisDataParam
.- Overrides:
hashCode
in 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.
-
toString
public java.lang.String toString()
Create a string representation of this parameter which simply consists of the parameter's name.- Overrides:
toString
in classjava.lang.Object
-
compareTo
public int compareTo(DataElement otherElement)
- Specified by:
compareTo
in interfacejava.lang.Comparable<DataElement>
-
-