com.rubecula.jquantity
Class UnitsFoundation

java.lang.Object
  |
  +--com.rubecula.jquantity.BaseUnit
        |
        +--com.rubecula.jquantity.UnitsFoundation
All Implemented Interfaces:
Auditable, Identifiable, Measurable
Direct Known Subclasses:
Units

public abstract class UnitsFoundation
extends BaseUnit
implements Auditable, Identifiable

The public abstract class UnitsFoundation is the base class from which the other Units (Measurable) classes are derived.

Version:
$Revision: 1.1 $
Author:
Robin Hillyard

Nested Class Summary
 class UnitsFoundation.UnitsException
           
 
Field Summary
protected  UnitsName _Name
          The name by which this UnitsFoundation will be identified.
 
Constructor Summary
(package private) UnitsFoundation()
           
(package private) UnitsFoundation(UnitsFoundation that)
           
(package private) UnitsFoundation(UnitsName name)
           
 
Method Summary
 java.lang.String audit()
          Method to return a detailed (unlabeled) string from an Auditable object for debugging purposes.
 void audit(java.io.PrintStream out, java.lang.String label)
          Method to output detailed string from an object for debugging purposes.
 java.lang.String audit(java.lang.String label)
          Method to return a detailed string from an arithmetical object for debugging purposes.
 java.lang.String getIdentifier()
          Method to get the specific identifier for an object.
 java.lang.String getName()
           
 boolean isNumber()
          Method to determine if this is dimensionless (i.e.
(package private)  void monitor(java.lang.String method, java.lang.String[] args, java.lang.String result)
           
(package private)  int normalize()
           
 void setIdentifier(java.lang.String identifier)
          Method to set a specific identifier to an object.
 void setName(java.lang.String name)
           
 void setName(java.lang.String nameAbbrev, boolean force)
           
 void setName(java.lang.String nameAbbrev, int exponent, boolean force)
           
 void setName(UnitsName name)
           
 void setName(UnitsName name, boolean force)
           
 void setName(UnitsName name, boolean force, int sysIndex)
           
 java.lang.String toString()
           
abstract  java.lang.String toString(int sysIndex)
           
 
Methods inherited from class com.rubecula.jquantity.BaseUnit
flatten, isEqual, isInSystem, isParallel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.rubecula.jquantity.Measurable
getDimensions, getOffset, getScale
 

Field Detail

_Name

protected UnitsName _Name
The name by which this UnitsFoundation will be identified.

Constructor Detail

UnitsFoundation

UnitsFoundation()

UnitsFoundation

UnitsFoundation(UnitsName name)

UnitsFoundation

UnitsFoundation(UnitsFoundation that)
Method Detail

setIdentifier

public void setIdentifier(java.lang.String identifier)
Method to set a specific identifier to an object.

Specified by:
setIdentifier in interface Identifiable
Parameters:
identifier - String: the identifier to associate with the object

getIdentifier

public java.lang.String getIdentifier()
Method to get the specific identifier for an object.

Specified by:
getIdentifier in interface Auditable
Returns:
String: the identifier.

audit

public java.lang.String audit(java.lang.String label)
Method to return a detailed string from an arithmetical object for debugging purposes.

Specified by:
audit in interface Auditable
Parameters:
label - String: the label to associate with the data
Returns:
the detailed string.

audit

public java.lang.String audit()
Method to return a detailed (unlabeled) string from an Auditable object for debugging purposes.

Specified by:
audit in interface Auditable
Returns:
the detailed string.

audit

public void audit(java.io.PrintStream out,
                  java.lang.String label)
Description copied from interface: Auditable
Method to output detailed string from an object for debugging purposes.

Specified by:
audit in interface Auditable
Parameters:
out - the output stream.
label - the label to attach to the output (may be null).

isNumber

public boolean isNumber()
Method to determine if this is dimensionless (i.e. unitless).

Overrides:
isNumber in class BaseUnit
Returns:
true if not in any System.

normalize

final int normalize()

toString

public abstract java.lang.String toString(int sysIndex)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setName

public final void setName(UnitsName name,
                          boolean force,
                          int sysIndex)

setName

public final void setName(UnitsName name,
                          boolean force)

setName

public final void setName(java.lang.String nameAbbrev,
                          int exponent,
                          boolean force)

setName

public final void setName(java.lang.String nameAbbrev,
                          boolean force)

setName

public final void setName(UnitsName name)

setName

public final void setName(java.lang.String name)

getName

public final java.lang.String getName()

monitor

void monitor(java.lang.String method,
             java.lang.String[] args,
             java.lang.String result)