S
- Abstract dimension types are recursively defined to enforce type-safetypublic interface Dimension<S extends Dimension<S>> extends ComparableUsing<S>, java.io.Serializable
Dimension
is the basis for a physical dimension. It models a dimension has having a measure represented as a
Rational
value and common arithmetic operations which also serve as operator overloads.
ComparableUsing.EqualityMode, ComparableUsing.Operator
Modifier and Type | Method and Description |
---|---|
S |
copy(Rational value)
Given a value produce a copy of this dimension with the given value
|
default S |
div(java.lang.Number operand) |
default Rational |
div(S operand) |
S |
fromNumber(Rational value) |
default S |
minus(S operand) |
default S |
plus(S operand) |
default S |
rem(java.lang.Number operand) |
default Rational |
rem(S operand) |
default S |
times(java.lang.Number operand) |
default Rational |
toBaseNumber() |
Rational |
toNumber() |
default S |
unaryMinus() |
compareToUsing, equalityMode
Rational toNumber()
default Rational toBaseNumber()
S fromNumber(Rational value)
value
.default S unaryMinus()
default S times(java.lang.Number operand)
default S div(java.lang.Number operand)
default S rem(java.lang.Number operand)
Copyright © 2024. All rights reserved.