com.rubecula.units
Interface Measurable

All Superinterfaces:
Identifiable
All Known Implementing Classes:
BaseUnit, JQuantity, Units

public interface Measurable
extends Identifiable

This interface specifies the methods which characterize a measurable (i.e. a Units).

Version:
$Revision: 1.1 $
Author:
Robin Hillyard

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.
 Rational getOffset()
          Method to return the offset of this Measurable.
 Rational getScale()
          Method to return the scale of this Measurable.
 SystemFlag getSystem()
           
 boolean isNumber()
          Method to determine if this is dimensionless (i.e. unitless).
 boolean isParallel(Measurable that)
          Method to determine if this Measurable is parallel to that Measurable.
 
Methods inherited from interface com.rubecula.util.Identifiable
getIdentifier
 

Method Detail

getDimensions

public Dimensions getDimensions()
Method to return the dimensions of this Measurable.

Returns:
the Dimensions.

getScale

public Rational getScale()
Method to return the scale of this Measurable.

Returns:
the scale.

getOffset

public Rational getOffset()
Method to return the offset of this Measurable.

Returns:
the offset, usually $0.

getSystem

public SystemFlag getSystem()

isNumber

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

Returns:
true if not in any System.

isParallel

public boolean isParallel(Measurable that)
Method to determine if this Measurable is parallel to that Measurable.

Parameters:
that - the Measurable to compare.
Returns:
true if the Dimensions of the Measurables are the same, i.e. if the Measurables differ only by a scale or offset.

flatten

public BaseUnit flatten()
                 throws UnitsException
Method to reduce a Units tree to a single flattened version.

Returns:
the equivalent FlatUnit.
Throws:
UnitsException