|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rubecula.util.Item
com.rubecula.units.BaseUnit
com.rubecula.units.SiUnit
This class represents, in its most primitive form, a unit of the Systeme International (SI). Only the dimension (type) of unit is represented here.
Field Summary | |
private int |
_Dimension
Instance field to define the dimension of this unit, according to values in the table defined above. |
protected static int |
$DimAngle
|
protected static int |
$DimConcentration
|
protected static int |
$DimCurrency
|
protected static int |
$DimCurrent
|
protected static int |
$DimDegree
|
protected static int |
$DimLength
|
protected static int |
$DimLight
|
protected static int |
$DimMass
|
protected static int |
$DimMax
|
protected static int |
$DimNone
|
protected static int |
$DimTime
|
static SiUnit |
ANGULAR
|
static SiUnit |
CURRENT
|
static SiUnit |
LINEAR
|
static SiUnit |
LUXAL
|
static SiUnit |
MASSIVE
|
static SiUnit |
MOLAR
|
static SiUnit |
MONETARY
|
static SiUnit |
NUMERIC
|
static SiUnit |
TEMPORAL
|
static SiUnit |
THERMAL
|
Fields inherited from class com.rubecula.util.Item |
JQUANTITY_TEST |
Constructor Summary | |
(package private) |
SiUnit(int dimension)
Primary constructor to create a SiUnit. |
Method Summary | |
java.lang.String |
audit(java.lang.String label)
Method to return a detailed string from an object for debugging purposes. |
BaseUnit |
flatten()
Method to reduce a Units tree to a single flattened version. |
Dimensions |
getDimensions()
Method to return the dimensions of this Measurable. |
java.lang.String |
getIdentifier()
Method to get the specific identifier for an object. |
Rational |
getOffset()
Method to return the offset of this Measurable. |
Rational |
getScale()
Method to return the scale of this Measurable. |
SystemFlag |
getSystem()
|
boolean |
isInSystem(int systemIndex)
Method to determine if this Measurable is in a certain system of units. |
boolean |
isNumber()
Method to determine if this is dimensionless (i.e. unitless). |
static void |
main(java.lang.String[] args)
|
Presentable |
makePresentableInstance(Presentation presentation)
Instance method to convert a Presentation into a Presentable. |
Presentation |
present(AttrMap attributes)
Convert this Presentable object into a Presentation, according to the set of attributes provided. |
java.lang.String |
toString()
This is the default toString method for all Items. |
Methods inherited from class com.rubecula.units.BaseUnit |
isEqual, isParallel, isParallelInSystem |
Methods inherited from class com.rubecula.util.Item |
audit, audit, 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 |
Field Detail |
protected static final int $DimNone
protected static final int $DimTime
protected static final int $DimLength
protected static final int $DimMass
protected static final int $DimAngle
protected static final int $DimCurrent
protected static final int $DimDegree
protected static final int $DimLight
protected static final int $DimConcentration
protected static final int $DimCurrency
protected static final int $DimMax
public static final SiUnit NUMERIC
public static final SiUnit TEMPORAL
public static final SiUnit LINEAR
public static final SiUnit MASSIVE
public static final SiUnit ANGULAR
public static final SiUnit CURRENT
public static final SiUnit THERMAL
public static final SiUnit LUXAL
public static final SiUnit MOLAR
public static final SiUnit MONETARY
private final int _Dimension
Constructor Detail |
SiUnit(int dimension)
dimension
- which dimension (according to the values defined below).Method Detail |
public Dimensions getDimensions()
public Rational getScale()
public Rational getOffset()
public boolean isInSystem(int systemIndex)
isInSystem
in class BaseUnit
systemIndex
- the index of the units system.
public BaseUnit flatten() throws UnitsException
UnitsException
public boolean isNumber()
isNumber
in interface Measurable
isNumber
in class BaseUnit
public java.lang.String toString()
Item
toString
in class Item
Item.present()
,
Presentation.toString()
public java.lang.String getIdentifier()
Identifiable
public java.lang.String audit(java.lang.String label)
label
- the label to associate with the data.
If label is non-null, a more detailed audit will be returned (this
normally occurs only at the top level).
public Presentation present(AttrMap attributes) throws PresentationException
attributes
- a map of the attributes desired for the construction
of the new presentation (may be empty).
PresentationException
- in case of parsing error.public Presentable makePresentableInstance(Presentation presentation) throws PresentationException
presentation
- of a number to be converted into a Presentable number.
PresentationException
- in case of parsing error.public static void main(java.lang.String[] args)
public SystemFlag getSystem()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |