All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class units.UnitAtom

java.lang.Object
   |
   +----units.Unit
           |
           +----units.UnitAtom

public class UnitAtom
extends Unit
This class is a specialization of class Unit. Every instance of this class is stored in a static table or database. Definition and retreival of unit atoms are performed by static member functions. This class is rarely used directly by the programmer but is essential for the unit parser.

Version:
$Id: UnitAtom.java,v 1.3 1998/09/02 17:30:11 schadow Exp $
Author:
Gunther Schadow

Variable Index

 o METRIC
 o NONMETRIC

Constructor Index

 o UnitAtom(String)
Instantiate a known UnitAtom from its name;.
 o UnitAtom(String, double, Dimension)
 o UnitAtom(String, double, Dimension, boolean)
 o UnitAtom(String, double, Dimension, Function, double)
 o UnitAtom(String, Unit)
Define a new UnitAtom name as <nu, u_vec>.
 o UnitAtom(String, Unit, Function, double)
 o UnitAtom(String, Unit, Function, double, boolean)

Method Index

 o assign(Unit)
Sets this unit to be equal to another unit u.
 o clone()
 o dump()
 o forDimension(Dimension)
Get a coherent Unit for dimension d
 o isDefined(String)
Tests if the units atom name is defined.
 o isMetric()
Tests if the units atom is metric.

Variables

 o METRIC
 public static final boolean METRIC
 o NONMETRIC
 public static final boolean NONMETRIC

Constructors

 o UnitAtom
 public UnitAtom(String _name,
                 double _nu,
                 Dimension _u_vec,
                 Function _cnv,
                 double _cnv_pfx)
 o UnitAtom
 public UnitAtom(String _name,
                 double _nu,
                 Dimension _u_vec,
                 boolean _metric)
 o UnitAtom
 public UnitAtom(String _name,
                 double _nu,
                 Dimension _u_vec)
 o UnitAtom
 public UnitAtom(String _name,
                 Unit u)
Define a new UnitAtom name as <nu, u_vec>.

 o UnitAtom
 public UnitAtom(String _name,
                 Unit u,
                 Function _cnv,
                 double _cnv_pfx)
 o UnitAtom
 public UnitAtom(String _name,
                 Unit u,
                 Function _cnv,
                 double _cnv_pfx,
                 boolean _metric)
 o UnitAtom
 public UnitAtom(String s)
Instantiate a known UnitAtom from its name;.

Methods

 o assign
 public Unit assign(Unit u)
Sets this unit to be equal to another unit u.

Overrides:
assign in class Unit
 o clone
 public Object clone()
Overrides:
clone in class Unit
 o isDefined
 public static boolean isDefined(String s)
Tests if the units atom name is defined.

 o isMetric
 public boolean isMetric()
Tests if the units atom is metric.

 o forDimension
 public static UnitAtom forDimension(Dimension d)
Get a coherent Unit for dimension d

Returns:
the unit atom or null if no such atom defined
 o dump
 public void dump()
Overrides:
dump in class Unit

All Packages  Class Hierarchy  This Package  Previous  Next  Index