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 intgetRadix()Retrieves the baseStringgetUnits()Retrieves the unitsbooleanisSupportedPDSType(Constants.DictionaryType type)Stringnormalize()voidsetRadix(int radix)Sets the radixvoidsetUnits(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:
isSupportedPDSTypein classScalar
-
-