Package tech.units.indriya.unit
Class ProductUnit.Element
java.lang.Object
tech.units.indriya.unit.ProductUnit.Element
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ProductUnit<Q extends javax.measure.Quantity<Q>>
Inner product element represents a rational power of a single unit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Holds the power exponent.private final int
Holds the root exponent.private static final long
private final javax.measure.Unit<?>
Holds the single unit. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Element
(javax.measure.Unit<?> unit, int pow, int root) Structural constructor. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
unit
private final javax.measure.Unit<?> unitHolds the single unit. -
pow
private final int powHolds the power exponent. -
root
private final int rootHolds the root exponent.
-
-
Constructor Details
-
Element
private Element(javax.measure.Unit<?> unit, int pow, int root) Structural constructor.- Parameters:
unit
- the unit.pow
- the power exponent.root
- the root exponent.
-
-
Method Details
-
getUnit
public javax.measure.Unit<?> getUnit()Returns this element's unit.- Returns:
- the single unit.
-
getPow
public int getPow()Returns the power exponent. The power exponent can be negative but is always different from zero.- Returns:
- the power exponent of the single unit.
-
getRoot
public int getRoot()Returns the root exponent. The root exponent is always greater than zero.- Returns:
- the root exponent of the single unit.
-
equals
-
hashCode
public int hashCode()
-