com.rubecula.jquantity
Class UnitsFoundation

java.lang.Object
  extended bycom.rubecula.util.Item
      extended bycom.rubecula.jquantity.BaseUnit
          extended bycom.rubecula.jquantity.UnitsFoundation
All Implemented Interfaces:
com.rubecula.util.Auditable, Comparable, com.rubecula.util.Identifiable, Measurable, com.rubecula.util.Nameable, com.rubecula.util.Presentable, Serializable
Direct Known Subclasses:
Units

public abstract class UnitsFoundation
extends BaseUnit
implements com.rubecula.util.Nameable, com.rubecula.util.Auditable

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

Version:
$Revision: 1.8 $
Author:
Robin Hillyard
See Also:
Serialized Form

Nested Class Summary
 class UnitsFoundation.UnitsException
           
 
Field Summary
protected  UnitsName _Name
          The name by which this UnitsFoundation will be identified.
private static boolean debug
           
 
Fields inherited from class com.rubecula.util.Item
JQUANTITY_TEST
 
Constructor Summary
(package private) UnitsFoundation()
           
(package private) UnitsFoundation(UnitsFoundation that)
           
(package private) UnitsFoundation(UnitsName name)
           
 
Method Summary
 String audit()
          Method to return a detailed (unlabeled) string from an Auditable object for debugging purposes.
 void audit(PrintStream out, String label)
           
 String audit(String label)
          Method to return a detailed string from an arithmetical object for debugging purposes.
 String getIdentifier()
          Method to get the specific identifier for an object.
 boolean isNumber()
          Method to determine if this is dimensionless (i.e. unitless).
(package private)  void monitor(String method, String[] args, String result)
           
(package private)  int normalize()
           
 void setIdentifier(String identifier)
          Method to set a specific identifier to an object.
 void setName(String name)
           
 void setName(String nameAbbrev, boolean force)
           
 void setName(String nameAbbrev, int exponent, boolean force)
           
 void setName(UnitsName name)
           
 void setName(UnitsName name, boolean force)
           
 void setName(UnitsName name, boolean force, int sysIndex)
           
 String toString()
           
abstract  String toString(int sysIndex)
           
 
Methods inherited from class com.rubecula.jquantity.BaseUnit
isEqual, isInSystem, isParallel, isParallelInSystem
 
Methods inherited from class com.rubecula.util.Item
compareTo, Debug, getClassNameShort, getType, IsDebug, present, SetDebug, test, test, Wrap
 
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
flatten, getDimensions, getOffset, getScale, getSystem
 
Methods inherited from interface com.rubecula.util.Presentable
makePresentableInstance, present
 

Field Detail

_Name

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


debug

private static boolean debug
Constructor Detail

UnitsFoundation

UnitsFoundation()

UnitsFoundation

UnitsFoundation(UnitsName name)

UnitsFoundation

UnitsFoundation(UnitsFoundation that)
Method Detail

setIdentifier

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

Specified by:
setIdentifier in interface com.rubecula.util.Nameable
Parameters:
identifier - String: the identifier to associate with the object

getIdentifier

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

Specified by:
getIdentifier in interface com.rubecula.util.Identifiable
Returns:
String: the identifier.

audit

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

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

audit

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

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

audit

public void audit(PrintStream out,
                  String label)
Specified by:
audit in interface com.rubecula.util.Auditable

isNumber

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

Specified by:
isNumber in interface Measurable
Overrides:
isNumber in class BaseUnit
Returns:
true if not in any System.

normalize

final int normalize()

toString

public abstract String toString(int sysIndex)

toString

public String toString()

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(String nameAbbrev,
                          int exponent,
                          boolean force)

setName

public final void setName(String nameAbbrev,
                          boolean force)

setName

public final void setName(UnitsName name)

setName

public final void setName(String name)

monitor

void monitor(String method,
             String[] args,
             String result)