Class Pressure

java.lang.Object
ome.units.quantity.Quantity
ome.units.quantity.Pressure
All Implemented Interfaces:
java.lang.Comparable<Pressure>

public class Pressure
extends Quantity
implements java.lang.Comparable<Pressure>
Pressure quantity.
Since:
5.1
  • Constructor Summary

    Constructors 
    Constructor Description
    Pressure​(java.lang.Number inValue, Unit<Pressure> inUnit)
    Create an Angle.
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(Pressure other)
    Check quantities for equality.
    boolean equals​(java.lang.Object other)
    Check quantities for equality.
    int hashCode()  
    java.lang.String toString()  
    Unit<Pressure> unit()
    Get the unit for this quantity.
    java.lang.Number value()
    Get the numerical value of this quantity.
    java.lang.Number value​(Unit<Pressure> inUnit)
    Perform a unit conversion.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pressure

      public Pressure​(java.lang.Number inValue, Unit<Pressure> inUnit)
      Create an Angle.
      Parameters:
      inValue - the value.
      inUnit - the unit type.
  • Method Details

    • value

      public java.lang.Number value()
      Description copied from class: Quantity
      Get the numerical value of this quantity.
      Specified by:
      value in class Quantity
      Returns:
      the value.
    • value

      public java.lang.Number value​(Unit<Pressure> inUnit)
      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

      public boolean equals​(java.lang.Object other)
      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.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if equal, false if not equal.
    • compareTo

      public int compareTo​(Pressure other)
      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:
      compareTo in interface java.lang.Comparable<Pressure>
      Returns:
      true if equal, false if not equal.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • unit

      public Unit<Pressure> unit()
      Description copied from class: Quantity
      Get the unit for this quantity.
      Specified by:
      unit in class Quantity
      Returns:
      the unit.