org.apache.commons.math3.fraction
Class FractionConversionException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.IllegalStateException
                  extended by org.apache.commons.math3.exception.MathIllegalStateException
                      extended by org.apache.commons.math3.exception.ConvergenceException
                          extended by org.apache.commons.math3.fraction.FractionConversionException
All Implemented Interfaces:
Serializable, ExceptionContextProvider

public class FractionConversionException
extends ConvergenceException

Error thrown when a double value cannot be converted to a fraction in the allowed number of iterations.

Since:
1.2
Version:
$Id: FractionConversionException.java 1416643 2012-12-03 19:37:14Z tn $
See Also:
Serialized Form

Constructor Summary
FractionConversionException(double value, int maxIterations)
          Constructs an exception with specified formatted detail message.
FractionConversionException(double value, long p, long q)
          Constructs an exception with specified formatted detail message.
 
Method Summary
 
Methods inherited from class org.apache.commons.math3.exception.MathIllegalStateException
getContext, getLocalizedMessage, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FractionConversionException

public FractionConversionException(double value,
                                   int maxIterations)
Constructs an exception with specified formatted detail message. Message formatting is delegated to MessageFormat.

Parameters:
value - double value to convert
maxIterations - maximal number of iterations allowed

FractionConversionException

public FractionConversionException(double value,
                                   long p,
                                   long q)
Constructs an exception with specified formatted detail message. Message formatting is delegated to MessageFormat.

Parameters:
value - double value to convert
p - current numerator
q - current denominator


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.