Package tech.units.indriya
Interface ComparableUnit<Q extends javax.measure.Quantity<Q>>
-
- Type Parameters:
Q
-
- All Superinterfaces:
java.lang.Comparable<javax.measure.Unit<Q>>
,java.io.Serializable
,javax.measure.Unit<Q>
- All Known Implementing Classes:
AbstractUnit
,AlternateUnit
,AnnotatedUnit
,BaseUnit
,ProductUnit
,TransformedUnit
public interface ComparableUnit<Q extends javax.measure.Quantity<Q>> extends javax.measure.Unit<Q>, java.lang.Comparable<javax.measure.Unit<Q>>, java.io.Serializable
Unit specialized for the Java SE platform. It extendsUnit
with Comparable and Serializable- Since:
- 1.0.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isEquivalentOf(javax.measure.Unit<Q> that)
Compares two instances of, doing the conversion of unit if necessary.
boolean
isSystemUnit()
Indicates if this unit belongs to the set of coherent SI units (unscaled SI units).
-
-
-
Method Detail
-
isEquivalentOf
boolean isEquivalentOf(javax.measure.Unit<Q> that)
Compares two instances of, doing the conversion of unit if necessary.
- Parameters:
that
- theUnit<Q>
to be compared with this instance.- Returns:
true
ifthat < this
.- Throws:
java.lang.NullPointerException
- if the unit is null
-
isSystemUnit
boolean isSystemUnit()
Indicates if this unit belongs to the set of coherent SI units (unscaled SI units). The base and coherent derived units of the SI form a coherent set, designated the set of coherent SI units. The word coherent is used here in the following sense: when coherent units are used, equations between the numerical values of quantities take exactly the same form as the equations between the quantities themselves. Thus if only units from a coherent set are used, conversion factors between units are never required.- Returns:
equals(toSystemUnit())
-
-