org.xspace.mx
Interface Unit

All Known Implementing Classes:
SI.Angle, SI.Length, SI.Mass, SI.Time

public interface Unit

A Unit represents some multiple of a UnitType. That multiple is equivalent to the power by which a UnitType is raised.

For example, a Measurement of five square meters (5 [m^2]) has a Length Unit raised to the power of two (2).

Since:
0.1

Method Summary
 double getPower()
          The power that the UnitType has been raised to.
 UnitType getType()
          A reference to UnitType that this Unit is a multiple of.
 void setPower(double power)
          The power that this Unit should be set to.
 

Method Detail

getType

public UnitType getType()
A reference to UnitType that this Unit is a multiple of.

Returns:
A reference to UnitType that this Unit is a multiple of.

getPower

public double getPower()
The power that the UnitType has been raised to.

Returns:
The power that the UnitType has been raised to.

setPower

public void setPower(double power)
The power that this Unit should be set to.

Parameters:
power - The power that this Unit should be set to.