Class 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:
    October 15, 2015
    Author:
    Joseph A. Huwaldt, Date: March 5, 2003
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Compares the specified object with this parameter for strict equality same text, same name, and same user data.
      javolution.text.Text getText()
      Return the text of this text parameter.
      int hashCode()
      Returns the hash code for this UnitParameter.
      static TextParam newInstance​(java.lang.CharSequence name)
      Returns a new, preallocated or recycled TextParam instance (on the stack when executing in a StackContext) with the specified name and containing no text.
      static void recycle​(TextParam instance)
      Recycles a parameter instance immediately (on the stack when executing in a StackContext).
      void setText​(java.lang.CharSequence text)
      Change the text contained in this parameter.
      java.lang.String toString()
      Create a string representation of this parameter which consists of the parameter's name and text.
      javolution.text.Text toText()
      Create a Text representation of this parameter which consists of the parameter's name and text.
      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).
      • Methods inherited from class java.lang.Object

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

      • newInstance

        public static TextParam newInstance​(java.lang.CharSequence name)
        Returns a new, preallocated or recycled TextParam instance (on the stack when executing in a StackContext) with the specified name and containing no text.
        Parameters:
        name - The name to be assigned to this parameter (may not be null).
      • recycle

        public static void recycle​(TextParam instance)
        Recycles a parameter instance immediately (on the stack when executing in a StackContext).
      • 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).
      • getText

        public javolution.text.Text getText()
        Return the text of this text parameter. Could return an empty string if there is no text.
      • setText

        public void setText​(java.lang.CharSequence text)
        Change the text contained in this parameter. The text can not be null.
      • 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.
        Overrides:
        equals in class DataParam
        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 UnitParameter.
        Overrides:
        hashCode in class DataParam
        Returns:
        the hash code value.
      • toText

        public javolution.text.Text toText()
        Create a Text representation of this parameter which consists of the parameter's name and text.
        Overrides:
        toText in class DataParam
      • toString

        public java.lang.String toString()
        Create a string representation of this parameter which consists of the parameter's name and text.
        Overrides:
        toString in class DataParam