Numeric.NumericInit, Numeric.ValueHelperUnit.UnitInit| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_RESOLUTION |
| Constructor and Description |
|---|
Length(double value,
UnitType type)
Initializes a new instance of the
Length class. |
Length(double value,
UnitType type,
int resolution)
Initializes a new instance of the
Length class. |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(Unit.UnitInit data)
Initializes a unit with a specified data.
|
protected double |
onConvert(double value,
UnitType fromType,
UnitType toType)
Called when unit is converted to the specified unit type.
|
static Length |
op_Addition(Length a,
Length b)
Implements the operator +.
|
static boolean |
op_Equality(Length a,
Length b)
Implements the operator ==.
|
static boolean |
op_GreaterThan(Length a,
Length b)
Implements the operator >.
|
static boolean |
op_GreaterThanOrEqual(Length a,
Length b)
Implements the operator >=.
|
static boolean |
op_Inequality(Length a,
Length b)
Implements the operator !
|
static boolean |
op_LessThan(Length a,
Length b)
Implements the operator <.
|
static boolean |
op_LessThanOrEqual(Length a,
Length b)
Implements the operator <=.
|
static Length |
op_Subtraction(Length a,
Length b)
Implements the operator -.
|
compareTo, equals, getValue, getValue, hashCodeequals, fromCentimeters, fromDegrees, fromDotsPerCentimeters, fromDotsPerInch, fromDotsPerPixel, fromGradians, fromHertz, fromInches, fromKiloHertz, fromMillimeters, fromMilliseconds, fromPicas, fromPixels, fromPoints, fromQuarterMillimeters, fromRadians, fromSeconds, fromTurns, getUnitTypepublic static final int DEFAULT_RESOLUTION
public Length(double value,
UnitType type)
Initializes a new instance of the Length class.
value - The value.type - The type.public Length(double value,
UnitType type,
int resolution)
Initializes a new instance of the Length class.
value - The value.type - The type.resolution - The resolution.ArgumentExceptionpublic static Length op_Addition(Length a, Length b)
Implements the operator +.
a - Parameter a.b - Parameter b.ArgumentNullException - Arguments are nullArgumentException - Arguments have different types
or
Arguments have different resolution
orpublic static Length op_Subtraction(Length a, Length b)
Implements the operator -.
a - The parameter a.b - The parameter b.ArgumentNullException - Arguments are nullArgumentException - Arguments have different types
or
Arguments have different resolutions
orpublic static boolean op_LessThan(Length a, Length b)
Implements the operator <.
a - The parameter a.b - The parameter b.ArgumentException - Arguments have different typesArgumentNullException - An argument is nullpublic static boolean op_GreaterThan(Length a, Length b)
Implements the operator >.
a - The parameter a.b - The parameter b.ArgumentException - Arguments have different typesArgumentNullException - An argument is nullpublic static boolean op_LessThanOrEqual(Length a, Length b)
Implements the operator <=.
a - The parameter a.b - The parameter b.ArgumentException - Arguments have different typesArgumentNullException - An argument is nullpublic static boolean op_GreaterThanOrEqual(Length a, Length b)
Implements the operator >=.
a - The parameter a.b - The parameter b.ArgumentException - Arguments have different typesArgumentNullException - An argument is nullpublic static boolean op_Equality(Length a, Length b)
Implements the operator ==.
a - The parameter a.b - The parameter b.public static boolean op_Inequality(Length a, Length b)
Implements the operator !=.
a - The parameter a.b - The parameter b.public void initialize(Unit.UnitInit data)
Initializes a unit with a specified data.
initialize in class Numericdata - The data.