Class DataValue

  • All Implemented Interfaces:
    Data

    public class DataValue
    extends Object
    implements Data
    Simple value type of Data. Wrapper of textual value.
    • Constructor Detail

      • DataValue

        public DataValue​(String value)
        Creates new instance of given value.
        Parameters:
        value - textual value, can't be null
    • Method Detail

      • isList

        public boolean isList()
        Specified by:
        isList in interface Data
        Returns:
        true if this instance is of kind list, false otherwise
      • isValue

        public boolean isValue()
        Specified by:
        isValue in interface Data
        Returns:
        true if this instance is of kind value, false otherwise
      • textValue

        public String textValue()
        Specified by:
        textValue in interface Data
        Returns:
        text data value, throws exception for data which can't be represented as text
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object