Package ucar.visad

Class Constants

java.lang.Object
ucar.visad.Constants

public class Constants extends Object
Provides support for scientific constants.
Version:
$Revision: 1.8 $ $Date: 2005/05/13 18:34:02 $
Author:
Steven R. Emmerson
  • Constructor Details

    • Constants

      protected Constants(Constants parent) throws VisADException
      Constructs from a parent constant table or null. Protected to prevent use. The parent table will be searched if the constant is not found in this instances's table.
      Parameters:
      parent - The parent constant table or null.
      Throws:
      VisADException - if a core VisAD failure occurs.
  • Method Details

    • instance

      public static Constants instance()
      Returns an instance of this class.
      Returns:
      An instance of this class.
    • put

      public Real put(String name, Real value)
      Stores a constant into the table.
      Parameters:
      name - The name of the constant.
      value - The value of the constant.
      Returns:
      The value previously stored under the name. May be null.
    • get

      public Real get(String name)
      Returns the constant with a given name.
      Parameters:
      name - The name of the constant.
      Returns:
      The constant with the given name. May be null if not found.