Package gov.nasa.pds.tools.label
Class Scalar
- java.lang.Object
-
- gov.nasa.pds.tools.label.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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
String
getValue()
Retrieves the valueint
hashcode()
abstract boolean
isSupportedPDSType(Constants.DictionaryType type)
String
toString()
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.
-
-
-
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.
-
isSupportedPDSType
public abstract boolean isSupportedPDSType(Constants.DictionaryType type)
-
hashcode
public int hashcode()
-
-