Class StringValue

  • All Implemented Interfaces:
    Value

    public class StringValue
    extends BaseValue
    A StringValue provides an implementation of the Value interface representing a string value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      StringValue​(java.lang.String text)
      Constructs a StringValue object representing a string.
    • Constructor Detail

      • StringValue

        public StringValue​(java.lang.String text)
        Constructs a StringValue object representing a string.
        Parameters:
        text - the string this StringValue should represent
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.

        The result is true if and only if the argument is not null and is a StringValue object that represents the same value as this object.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns zero to satisfy the Object equals/hashCode contract. This class is mutable and not meant to be used as a hash key.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        always zero
        See Also:
        Object.hashCode()