|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rubecula.util.Item
com.rubecula.jquantity.BaseUnit
com.rubecula.jquantity.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 | |
String |
audit(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. |
String |
getIdentifier()
|
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(String[] args)
|
com.rubecula.util.Presentable |
makePresentableInstance(com.rubecula.util.Presentation presentation)
Instance method to convert a Presentation into a Presentable. |
com.rubecula.util.Presentation |
present(com.rubecula.util.AttrMap attributes)
Convert this Presentable object into a Presentation, according to the set of attributes provided. |
String |
toString()
|
Methods inherited from class com.rubecula.jquantity.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 JQuantityException
JQuantityException
public boolean isNumber()
isNumber
in interface Measurable
isNumber
in class BaseUnit
public String toString()
public String getIdentifier()
public String audit(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 com.rubecula.util.Presentation present(com.rubecula.util.AttrMap attributes) throws com.rubecula.util.PresentationException
attributes
- a map of the attributes desired for the construction
of the new presentation (may be empty).
com.rubecula.util.PresentationException
- in case of parsing error.public com.rubecula.util.Presentable makePresentableInstance(com.rubecula.util.Presentation presentation) throws com.rubecula.util.PresentationException
presentation
- of a number to be converted into a Presentable number.
com.rubecula.util.PresentationException
- in case of parsing error.public static void main(String[] args)
public SystemFlag getSystem()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |