A
- The unit type on the left hand sideB
- The unit type on the right hand sideD
- The Dimension
type expressed using this binary product of unit typesU
- This type (recursive to enforce type-safety).public abstract class AbstractProductUnit<A extends Unit,B extends Unit,D extends Dimension<D>,U extends AbstractProductUnit<A,B,D,U>> extends AbstractBinaryUnit<A,B,D,U>
Area
which is the product of two LengthUnit
s.
ComparableUsing.EqualityMode, ComparableUsing.Operator
Modifier | Constructor and Description |
---|---|
protected |
AbstractProductUnit(A leftUnit,
B rightUnit) |
protected |
AbstractProductUnit(A leftUnit,
B rightUnit,
Rational factor) |
protected |
AbstractProductUnit(A leftUnit,
B rightUnit,
Rational factor,
String name) |
protected |
AbstractProductUnit(A leftUnit,
B rightUnit,
Rational factor,
String name,
String symbol) |
Modifier and Type | Method and Description |
---|---|
B |
div(A a) |
String |
getFullName() |
String |
getFullSymbol() |
String |
getName() |
String |
getSymbol() |
Rational |
toBaseUnits(Rational myUnits) |
Rational |
toNumber() |
equals, from, getFactor, getLeftUnit, getRightUnit, hashCode, toString
clone, emptyArray, finalize, getClass, jailbreak, notify, notifyAll, wait, wait, wait
compareTo, copy, fromNumber, makeDimension, postfixBind
div, div, minus, plus, rem, rem, times, toBaseNumber, unaryMinus
compareToUsing, equalityMode
protected AbstractProductUnit(A leftUnit, B rightUnit, Rational factor, String name)
public String getName()
getName
in interface Unit<D extends Dimension<D>,U extends AbstractProductUnit<A,B,D,U>>
getName
in class AbstractBinaryUnit<A extends Unit,B extends Unit,D extends Dimension<D>,U extends AbstractProductUnit<A,B,D,U>>
public String getSymbol()
getSymbol
in interface Unit<D extends Dimension<D>,U extends AbstractProductUnit<A,B,D,U>>
getSymbol
in class AbstractBinaryUnit<A extends Unit,B extends Unit,D extends Dimension<D>,U extends AbstractProductUnit<A,B,D,U>>
public String getFullName()
public String getFullSymbol()
public Rational toBaseUnits(Rational myUnits)
myUnits
- A magnitude of these units to convert to base units.theseUnits
converted to the base units of this unit type.public Rational toNumber()
Copyright © 2024. All rights reserved.