gov.nasa.pds.tools.label
Class Numeric

java.lang.Object
  extended by gov.nasa.pds.tools.label.Scalar
      extended by gov.nasa.pds.tools.label.Numeric
All Implemented Interfaces:
Value

public class Numeric
extends Scalar

This class represents a numeric scalar. It is not type specific so everything is represented as a String.

Version:
$Revision: 5679 $
Author:
pramirez, jagander

Constructor Summary
Numeric(String value)
          Constructs a Numeric with the given value
Numeric(String value, int radix)
          Constructs a Numeric with the given value and radix
Numeric(String value, String units)
          Constructs a Numeric with the given value and units
Numeric(String value, String units, int radix)
          Constructs a Numeric with the given value, units and radix
 
Method Summary
 int getRadix()
          Retrieves the base
 String getUnits()
          Retrieves the units
 boolean isSupportedPDSType(Constants.DictionaryType type)
           
 String normalize()
           
 void setRadix(int radix)
          Sets the radix
 void setUnits(String units)
          Sets the units
 
Methods inherited from class gov.nasa.pds.tools.label.Scalar
equals, getValue, hashcode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 numeric
units - of numeric

Numeric

public Numeric(String value,
               int radix)
Constructs a Numeric with the given value and radix

Parameters:
value - of numeric
radix - of numeric

Numeric

public Numeric(String value,
               String units,
               int radix)
Constructs a Numeric with the given value, units and radix

Parameters:
value - of numeric
units - of numeric
radix - 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 class Scalar


Copyright © 2005-2011 Planetary Data System. All Rights Reserved.