com.rational.test.ft.value

Class ConstrainedInteger

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


  • public class ConstrainedInteger
    extends java.lang.Object
    Enforces a range of values within which a particular property (or attribute of a property) can be defined. The editor rejects any attempts to change the value to a number outside the specified range.

    Note that this class exists solely as a container for integer values with strict boundaries that the property editor must enforce. Although a value manager exists for this type, the intended use is for generalized display support and not as a true property value.

    Since:
    RFT1.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      ConstrainedInteger(int value, int loBound, int hiBound)
      Enforces the boundaries within which the specified value must be contained.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getHiBound()
      Gets the high end of the bounded range.
      int getLoBound()
      Gets the low end of the bounded range.
      int getValue()
      Accesses the bounded value.
      void setValue(int value)
      Sets the bounded value.
      java.lang.String toString()
      Sets the textual representation of the bounded value.
      • Methods inherited from class java.lang.Object

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

      • ConstrainedInteger

        public ConstrainedInteger(int value,
                                  int loBound,
                                  int hiBound)
        Enforces the boundaries within which the specified value must be contained. Is the sole constructor. Note that the boundaries are inclusively used by the display manager for this type. They are used only when the editor rejects a modified value that is less than the loBound or greater than the hiBound.
        Since:
        RFT1.0
    • Method Detail

      • getValue

        public int getValue()
        Accesses the bounded value.
        Since:
        RFT1.0
      • setValue

        public void setValue(int value)
        Sets the bounded value.
        Since:
        RFT1.0
      • getLoBound

        public int getLoBound()
        Gets the low end of the bounded range.
        Since:
        RFT1.0
      • getHiBound

        public int getHiBound()
        Gets the high end of the bounded range.
        Since:
        RFT1.0
      • toString

        public java.lang.String toString()
        Sets the textual representation of the bounded value. Note that the boundaries are not represented in this text, only the bounded value is. The boundaries are assumed to be implicit in the definition of the property.
        Overrides:
        toString in class java.lang.Object
        Since:
        RFT1.0