|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--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.
| 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 | |
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 |
getName()
|
Rational |
getOffset()
Method to return the offset of this Measurable. |
Rational |
getScale()
Method to return the scale of this Measurable. |
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. |
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
| Methods inherited from class com.rubecula.jquantity.BaseUnit |
isParallel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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 Dimensions getDimensions()
public Rational getScale()
public Rational getOffset()
public boolean isInSystem(int sysIndex)
isInSystem in class BaseUnitsysIndex - the index of the units system.
public BaseUnit flatten()
throws JQuantityException
flatten in class BaseUnitJQuantityExceptionpublic boolean isNumber()
isNumber in class BaseUnitpublic final java.lang.String getName()
public boolean isEqual(Measurable other)
BaseUnit
isEqual in class BaseUnitother - the Measurable to compare.
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||