com.rational.test.ft.value

Class ReadOnlyString

  • java.lang.Object
    • com.rational.test.ft.value.ReadOnlyString


  • public class ReadOnlyString
    extends java.lang.Object
    Displays an object without allowing modification to the original object in the editor. This class is used to wrap fixed object values with a viewable representation. This class is primarily used in the editors to block editing of read-only values.
    Since:
    RFT1.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      ReadOnlyString(java.lang.Object base, java.lang.String value)
      Enforces the separation between the true object and the viewable form of the object in the editors.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      Overloads the core java.lang.Object implementation to compare the String directly.
      java.lang.Object getBaseObject()
      Accesses the base object represented by the editor.
      java.lang.String getReadOnlyString()
      Accesses the textual representation of the base value displayed in the editor.
      int hashCode()
      Overloads the core java.lang.Object implementation of hashCode.
      void setReadOnlyString(java.lang.String value)
      Updates the textual representation of the base value.
      java.lang.String toString()
      Accesses the textual representation of the base value as defined in the constructor.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ReadOnlyString

        public ReadOnlyString(java.lang.Object base,
                              java.lang.String value)
        Enforces the separation between the true object and the viewable form of the object in the editors.
        Parameters:
        base - the true object represented in the editor
        value - the textual image of the base object for display to the user
        Since:
        RFT1.0
    • Method Detail

      • getBaseObject

        public java.lang.Object getBaseObject()
        Accesses the base object represented by the editor. Note that a set method to update the original value does not exist. That is, the original value cannot be updated.
        Since:
        RFT1.0
      • getReadOnlyString

        public java.lang.String getReadOnlyString()
        Accesses the textual representation of the base value displayed in the editor. This value can be updated, but will have no effect on the original base value.
        Since:
        RFT1.0
      • setReadOnlyString

        public void setReadOnlyString(java.lang.String value)
        Updates the textual representation of the base value.
        Since:
        RFT1.0
      • toString

        public java.lang.String toString()
        Accesses the textual representation of the base value as defined in the constructor.
        Overrides:
        toString in class java.lang.Object
        Since:
        RFT1.0
      • hashCode

        public int hashCode()
        Overloads the core java.lang.Object implementation of hashCode.
        Overrides:
        hashCode in class java.lang.Object
        Since:
        RFT1.0
      • equals

        public boolean equals(java.lang.Object obj)
        Overloads the core java.lang.Object implementation to compare the String directly.
        Overrides:
        equals in class java.lang.Object
        Since:
        RFT1.0