Class Scalar

  • All Implemented Interfaces:
    Value
    Direct Known Subclasses:
    DateTime, Numeric, Symbol, TextString

    public abstract class Scalar
    extends Object
    implements Value
    This class represents a Scalar which can be assigned to an attribute or be a part of a Set or Sequence.
    Version:
    $Revision$
    Author:
    pramirez, jagander
    • Constructor Detail

      • Scalar

        protected Scalar​(String value)
      • Scalar

        protected Scalar​(String value,
                         ValueType type)
        Constructs a Scalar
        Parameters:
        value -
    • Method Detail

      • getValue

        public String getValue()
        Retrieves the value
        Returns:
        the value
      • toString

        public String toString​(boolean retainQuotes)
        Provides a string representation of the Scalar value with single or double quotes surrounding it if the retainQuotes flag is set to true and the ValueType was SINGLE_QUOTED or DOUBLE_QUOTED.
        Parameters:
        retainQuotes - Set to true to return the value with quotes surrounding it if it was originally there in the label.
        Returns:
        The string.
      • hashcode

        public int hashcode()