Package ome.units.quantity
Class ElectricPotential
java.lang.Object
ome.units.quantity.Quantity
ome.units.quantity.ElectricPotential
- All Implemented Interfaces:
Comparable<ElectricPotential>
ElectricPotential quantity.
- Since:
- 5.1
-
Constructor Summary
ConstructorsConstructorDescriptionElectricPotential(Number inValue, Unit<ElectricPotential> inUnit) Create an ElectricPotential. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ElectricPotential other) Check quantities for equality.booleanCheck quantities for equality.inthashCode()toString()unit()Get the unit for this quantity.value()Get the numerical value of this quantity.value(Unit<ElectricPotential> inUnit) Perform a unit conversion.
-
Constructor Details
-
ElectricPotential
Create an ElectricPotential.- Parameters:
inValue- the value.inUnit- the unit type.
-
-
Method Details
-
value
Description copied from class:QuantityGet the numerical value of this quantity. -
value
Perform a unit conversion.- Parameters:
inUnit- the unit to convert to.- Returns:
- the current quantity value converted to the specified unit, or null if the conversion is not possible.
-
equals
Check quantities for equality. Unit conversion will be performed when required to convert into the unit system of this quantity in order to perform the comparison. Note that floating point comparison is dangerous. Do not use this method. -
compareTo
Check quantities for equality. Unit conversion will be performed when required to convert into the unit system of this quantity in order to perform the comparison. Note that floating point comparison is dangerous. Do not use this method.- Specified by:
compareToin interfaceComparable<ElectricPotential>- Returns:
- true if equal, false if not equal.
-
hashCode
public int hashCode() -
toString
-
unit
Description copied from class:QuantityGet the unit for this quantity.
-