Class 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:
  • Constructor Details

    • 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 Details

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