org.znerd.math
Class CanNotCompareException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.znerd.math.CanNotCompareException

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.3 $ $Date: 2002/06/13 20:26:30 $
Author:
Ernst de Haan (znerd@FreeBSD.org)
See Also:
RealNumber.compareTo(RealNumber), Serialized Form

Constructor Summary
CanNotCompareException(RealNumber a, RealNumber b)
          Constructs a new CanNotCompareException for a failed comparison between the specified numbers.
 
Method Summary
 RealNumber[] getNumbers()
          Returns the numbers that could not be compared in a new array.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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/.