Class Value

    • Constructor Detail

      • Value

        public Value()
    • Method Detail

      • toString

        public abstract String toString()
        Values must override the default method to return a string representation that is immutable.
        Overrides:
        toString in class Object
        Returns:
        String representation
      • hashCode

        public abstract int hashCode()
        Values must override the default hashcode method.
        Overrides:
        hashCode in class Object
        Returns:
        int hashcode
      • equals

        public abstract boolean equals​(Object obj)
        Values must override the default equals method. This method should only return true if the supplied Object is of the same type as the implementing Value. Values of an unknown type should be coerced before calling this method. This method does not have to guarantee that this.equals(that) == this.toString().equals(that.toString())
        Overrides:
        equals in class Object
        Parameters:
        obj -
        Returns:
        boolean
      • isEmpty

        public boolean isEmpty()
        Check whether this Value is an empty value and has a zero length string representation. Subclasses may wish to override this for efficiency if the String representation is lazily created.
        Returns:
        boolean true if empty
      • equivalent

        public boolean equivalent​(Value value)
      • info

        public static ArgumentInfo info()
        Use this method to return an ArgumentInfo argument that can be used to refer to ANY Value subclass. Usually, you will want to get an ArgumentInfo object directly from a specific Value subclass.
        Returns:
        ArgumentInfo info