|
||||||||||
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.FlatUnit
The public class FlatUnit is used to describe a Measurable which has been flattened out so that all its dimensions and its scale are readily apparent.
Field Summary | |
private Dimensions |
_Dimensions
The Dimensions corresponding to this flattened unit. |
private Rational |
_Scale
The scale of this flattened unit. |
Fields inherited from class com.rubecula.util.Item |
JQUANTITY_TEST |
Constructor Summary | |
(package private) |
FlatUnit(Dimensions dimensions,
Rational scale)
Primary constructor to create a FlatUnit. |
(package private) |
FlatUnit(Measurable other)
Constructor to copy another Measurable. |
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()
|
UnitsName |
getName()
|
Rational |
getOffset()
Method to return the offset of this Measurable. |
Rational |
getScale()
Method to return the scale of this Measurable. |
SystemFlag |
getSystem()
|
boolean |
isEqual(Measurable other)
Method to determine if this BaseUnit is equivalent to that Measurable. |
boolean |
isInSystem(int sysIndex)
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 |
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 |
private Dimensions _Dimensions
private Rational _Scale
Constructor Detail |
FlatUnit(Dimensions dimensions, Rational scale)
dimensions
- the Dimensions to use.scale
- the scale to use.FlatUnit(Measurable other) throws JQuantityException
other
- that other Measurable.
JQuantityException
Method Detail |
public UnitsName getName()
public SystemFlag getSystem()
public Dimensions getDimensions()
public Rational getScale()
public Rational getOffset()
public boolean isInSystem(int sysIndex)
isInSystem
in class BaseUnit
sysIndex
- the index of the units system.
public BaseUnit flatten() throws JQuantityException
JQuantityException
public boolean isNumber()
isNumber
in interface Measurable
isNumber
in class BaseUnit
public final String getIdentifier()
public boolean isEqual(Measurable other)
BaseUnit
isEqual
in class BaseUnit
other
- the Measurable to compare.
public String toString()
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |