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: 2606 $
Author:
pramirez

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

Constructor Detail

Numeric

public Numeric(java.lang.String value)
Constructs a Numeric with the given value

Parameters:
value - of numeric

Numeric

public Numeric(java.lang.String value,
               java.lang.String units)
Constructs a Numeric with the given value and units

Parameters:
value - of numeric
units - of numeric

Numeric

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

Parameters:
value - of numeric
radix - of numeric

Numeric

public Numeric(java.lang.String value,
               java.lang.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(java.lang.String units)
Sets the units

Parameters:
units - of the numeric

getUnits

public java.lang.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


Copyright © 2005-2007 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.