Top Description Fields Constructors
javax.measure

public Class IncommensurableException

extends Exception
Class Inheritance

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.

Authors
Jean-Marie Dautelle, Werner Keil
Since
1.0
Version
1.0, August 8, 2016
See Also
Wikipedia: Unit Commensurability

Field Summary

Modifier and TypeField and Description
private static final long
serialVersionUID

Hides java.lang.Exception.serialVersionUID.

For cross-version compatibility.

Constructor Summary

AccessConstructor and Description
public
IncommensurableException(final String
the detail message, or null if none.
message
)

Constructs a IncommensurableException with the given message.

public
IncommensurableException(final Throwable
the cause of this exception, or null if none.
cause
)

Constructs a IncommensurableException with the given cause.

public
IncommensurableException(final String
the detail message, or null if none.
message
,
final Throwable
the cause of this exception, or null if none.
cause
)

Constructs a IncommensurableException with the given message and cause.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.Exception.serialVersionUID.

For cross-version compatibility.

Constructor Detail

IncommensurableExceptionback to summary
public IncommensurableException(final String message)

Constructs a IncommensurableException with the given message.

Parameters
message:String

the detail message, or null if none.

IncommensurableExceptionback to summary
public IncommensurableException(final Throwable cause)

Constructs a IncommensurableException with the given cause.

Parameters
cause:Throwable

the cause of this exception, or null if none.

IncommensurableExceptionback to summary
public IncommensurableException(final String message, final Throwable cause)

Constructs a IncommensurableException with the given message and cause.

Parameters
message:String

the detail message, or null if none.

cause:Throwable

the cause of this exception, or null if none.