public abstract class Dimension extends Numeric
Provides the base class for dimensions.
The general term 'dimension' refers to a number with a unit attached to it, and are denoted by UnitType
(Unit.getUnitType()
).
Unit
Numeric.NumericInit, Numeric.ValueHelper
Unit.UnitInit
Constructor and Description |
---|
Dimension(double value,
UnitType type)
Initializes a new instance of the
Dimension class. |
Dimension(Numeric.NumericInit data)
Initializes a new instance of the
Dimension class. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
toString()
Returns a
String that represents this instance. |
java.lang.String |
toString(UnitType unitType)
Returns a
String that represents this instance in the spicified units. |
compareTo, equals, getValue, getValue, hashCode, initialize, onConvert
equals, fromCentimeters, fromDegrees, fromDotsPerCentimeters, fromDotsPerInch, fromDotsPerPixel, fromGradians, fromHertz, fromInches, fromKiloHertz, fromMillimeters, fromMilliseconds, fromPicas, fromPixels, fromPoints, fromQuarterMillimeters, fromRadians, fromSeconds, fromTurns, getUnitType
public Dimension(double value, UnitType type)
Initializes a new instance of the Dimension
class.
value
- The value.type
- The type.public Dimension(Numeric.NumericInit data)
Initializes a new instance of the Dimension
class.
data
- The initialization data.public java.lang.String toString()
Returns a String
that represents this instance.
public java.lang.String toString(UnitType unitType)
Returns a String
that represents this instance in the spicified units.
unitType
- The unit type.String
that represents this instance.