Package gov.nasa.pds.tools.label
Class Numeric
- java.lang.Object
-
- gov.nasa.pds.tools.label.Scalar
-
- gov.nasa.pds.tools.label.Numeric
-
-
Constructor Summary
Constructors Constructor Description Numeric(String value)
Constructs a Numeric with the given valueNumeric(String value, int radix)
Constructs a Numeric with the given value and radixNumeric(String value, String units)
Constructs a Numeric with the given value and unitsNumeric(String value, String units, int radix)
Constructs a Numeric with the given value, units and radix
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getRadix()
Retrieves the baseString
getUnits()
Retrieves the unitsboolean
isSupportedPDSType(Constants.DictionaryType type)
String
normalize()
void
setRadix(int radix)
Sets the radixvoid
setUnits(String units)
Sets the units
-
-
-
Constructor Detail
-
Numeric
public Numeric(String value)
Constructs a Numeric with the given value- Parameters:
value
- of numeric
-
Numeric
public Numeric(String value, String units)
Constructs a Numeric with the given value and units- Parameters:
value
- of numericunits
- of numeric
-
Numeric
public Numeric(String value, int radix)
Constructs a Numeric with the given value and radix- Parameters:
value
- of numericradix
- of numeric
-
-
Method Detail
-
setUnits
public void setUnits(String units)
Sets the units- Parameters:
units
- of the numeric
-
getUnits
public String getUnits()
Retrieves the units- Returns:
- units
-
setRadix
public void setRadix(int radix)
Sets the radix- Parameters:
radix
- of the numeric
-
getRadix
public int getRadix()
Retrieves the base- Returns:
- base
-
normalize
public String normalize()
-
isSupportedPDSType
public boolean isSupportedPDSType(Constants.DictionaryType type)
- Specified by:
isSupportedPDSType
in classScalar
-
-