Class CanNotCompareException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.znerd.math.CanNotCompareException
- All Implemented Interfaces:
Serializable
Exception thrown to indicate a compare operation failed. This exception
is thrown by the
compareTo(RealNumber) method in
interface RealNumber.- Version:
- $Revision: 1.4 $ $Date: 2002/08/16 19:12:40 $
- Author:
- Ernst de Haan (znerd@FreeBSD.org)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newCanNotCompareExceptionfor a failed comparison between the specified numbers. -
Method Summary
Modifier and TypeMethodDescriptionReturns the numbers that could not be compared in a new array.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CanNotCompareException
Constructs a newCanNotCompareExceptionfor a failed comparison between the specified numbers.- Parameters:
a- the first number, notnull.b- the second number, notnull.- Throws:
IllegalArgumentException- ifa == null || b == null.
-
-
Method Details
-
getNumbers
Returns the numbers that could not be compared in a new array.- Returns:
- the numbers that could not be compared in a new array with size 2,
never
null.
-