Class Constant


  • public class Constant
    extends java.lang.Object
    A value source representing a constant value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Object value
      The value.
    • Constructor Summary

      Constructors 
      Constructor Description
      Constant​(java.lang.Object value)
      Create a constant.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Test if this constant equals another object.
      java.lang.Object getValue()
      Get the value.
      int hashCode()
      Get the hash code of this constant.
      java.lang.String toString()
      Get a stering representation.
      • Methods inherited from class java.lang.Object

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

      • value

        protected java.lang.Object value
        The value.
    • Constructor Detail

      • Constant

        public Constant​(java.lang.Object value)
        Create a constant.
        Parameters:
        value - The value.
    • Method Detail

      • getValue

        public java.lang.Object getValue()
        Get the value.
        Returns:
        The value.
      • equals

        public boolean equals​(java.lang.Object obj)
        Test if this constant equals another object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The other object.
        Returns:
        True, if equal.
      • hashCode

        public int hashCode()
        Get the hash code of this constant.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code.
      • toString

        public java.lang.String toString()
        Get a stering representation.
        Overrides:
        toString in class java.lang.Object