org.znerd.math
Class CanNotCompareException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.znerd.math.CanNotCompareException
- All Implemented Interfaces:
- Serializable
- public class CanNotCompareException
- extends RuntimeException
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:
RealNumber.compareTo(RealNumber)
,
Serialized Form
Method Summary |
RealNumber[] |
getNumbers()
Returns the numbers that could not be compared in a new array. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
CanNotCompareException
public CanNotCompareException(RealNumber a,
RealNumber b)
throws IllegalArgumentException
- Constructs a new
CanNotCompareException
for a failed
comparison between the specified numbers.
- Parameters:
a
- the first number, not null
.b
- the second number, not null
.
- Throws:
IllegalArgumentException
- if a == null || b == null
.
getNumbers
public RealNumber[] 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
.
See http://jump-math.sourceforge.net/.