Class 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 a case or run.

    Modified by: Joseph A. Huwaldt

    Version:
    October 15, 2015
    Author:
    Joseph A. Huwaldt, Date: March 5, 2003
    • 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 this DataParam.
      void setName​(java.lang.CharSequence name)
      Change the name of this parameter to the specified name (may not be null).
      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.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.CharSequence getName()
        Return the name of this parameter.
        Specified by:
        getName in interface DataElement
      • setName

        public void setName​(java.lang.CharSequence name)
        Change the name of this parameter to the specified name (may not be null).
        Specified by:
        setName in interface DataElement
      • getUserObject

        public java.lang.Object getUserObject()
        Return any user defined object associated with this data element. If there is no user data, then null is returned.
        Specified by:
        getUserObject in interface DataElement
      • 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. Storing null for no user object is fine.
        Specified by:
        setUserObject in interface DataElement
      • 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 class java.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 this DataParam.
        Overrides:
        hashCode in class java.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 class java.lang.Object