|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DerivableUnit
Interface for units that can convert numeric values to and from an underlying derived unit.
Method Summary | |
---|---|
double |
fromDerivedUnit(double amount)
Converts a numeric value from the underlying derived unit to this unit. |
double[] |
fromDerivedUnit(double[] input,
double[] output)
Converts numeric values from the underlying derived unit to this unit. |
float |
fromDerivedUnit(float amount)
Converts numeric values from the underlying derived unit to this unit. |
float[] |
fromDerivedUnit(float[] input,
float[] output)
Converts numeric values from the underlying derived unit to this unit. |
DerivedUnit |
getDerivedUnit()
Returns the derived unit that underlies this unit. |
double |
toDerivedUnit(double amount)
Converts a numeric value in this unit to the underlying derived unit. |
double[] |
toDerivedUnit(double[] input,
double[] output)
Converts numeric values in this unit to the underlying derived unit. |
float |
toDerivedUnit(float amount)
Converts a numeric value in this unit to the underlying derived unit. |
float[] |
toDerivedUnit(float[] input,
float[] output)
Converts numeric values in this unit to the underlying derived unit. |
Method Detail |
---|
DerivedUnit getDerivedUnit()
float toDerivedUnit(float amount) throws ConversionException
convertTo()
succeeds.
amount
- The numeric values in this unit.
ConversionException
- Can't convert values to underlying
derived unit.double toDerivedUnit(double amount) throws ConversionException
convertTo()
succeeds.
amount
- The numeric value in this unit.
ConversionException
- Can't convert to derived unit.float[] toDerivedUnit(float[] input, float[] output) throws ConversionException
convertTo()
succeeds.
input
- The numeric values in this unit.output
- The equivalent numeric values in the
underlying derived unit. May be the same
array as input
.
output
.
ConversionException
- Can't convert to derived unit.double[] toDerivedUnit(double[] input, double[] output) throws ConversionException
convertTo()
succeeds.
input
- The numeric values in this unit.output
- The equivalent numeric values in the
underlying derived unit. May be the same
array as input
.
output
.
ConversionException
- Can't convert to derived unit.float fromDerivedUnit(float amount) throws ConversionException
amount
- The numeric values in the underlying derived
unit.
ConversionException
- Can't convert values from underlying
derived unit.double fromDerivedUnit(double amount) throws ConversionException
convertTo()
succeeds.
amount
- The numeric value in the underlying derived
unit.
ConversionException
- Can't convert from underlying derived
unit.float[] fromDerivedUnit(float[] input, float[] output) throws ConversionException
convertTo()
succeeds.
input
- The numeric values in the underlying derived
unit.output
- The equivalent numeric values in this unit.
May be same array as input
.
output
.
ConversionException
- Can't convert from underlying derived
unit.double[] fromDerivedUnit(double[] input, double[] output) throws ConversionException
convertTo()
succeeds.
input
- The numeric values in the underlying derived
unit.output
- The equivalent numeric values in this unit.
May be same array as input
.
output
.
ConversionException
- Can't convert from underlying derived
unit.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |