Package javax.measure

Class IncommensurableException

java.lang.Object
java.lang.Throwable
java.lang.Exception
javax.measure.IncommensurableException
All Implemented Interfaces:
Serializable

public class IncommensurableException extends Exception
Signals that a problem of some sort has occurred due to incommensurable of some quantities/units. Only commensurable quantity (quantities with the same dimensions) may be compared, equated, added, or subtracted. Also, one unit can be converted to another unit only if both units are commensurable.

This is a checked exception, so it deliberately doesn't inherit from MeasurementException like most other exceptions.

Since:
1.0
Version:
1.0, August 8, 2016
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
  • Constructor Details

    • IncommensurableException

      public IncommensurableException(String message)
      Constructs a IncommensurableException with the given message.
      Parameters:
      message - the detail message, or null if none.
    • IncommensurableException

      public IncommensurableException(Throwable cause)
      Constructs a IncommensurableException with the given cause.
      Parameters:
      cause - the cause of this exception, or null if none.
    • IncommensurableException

      public IncommensurableException(String message, Throwable cause)
      Constructs a IncommensurableException with the given message and cause.
      Parameters:
      message - the detail message, or null if none.
      cause - the cause of this exception, or null if none.