net.sf.qualitycheck.exception
Class IllegalNumberRangeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.qualitycheck.exception.IllegalNumberRangeException
All Implemented Interfaces:
Serializable

public class IllegalNumberRangeException
extends RuntimeException

Thrown to indicate that a method has been passed with a number which is not in the range of the given datatype..

Author:
André Rouél, Dominik Seichter
See Also:
Serialized Form

Field Summary
protected static String DEFAULT_MESSAGE
          Default message to indicate that the a given arguments are not in the valid range of the datatype.
protected static String MESSAGE_WITH_VALUES
          Message to indicate that the the given arguments must be in the valid range for the datatype.
 
Constructor Summary
IllegalNumberRangeException()
          Constructs an IllegalNumberRangeException with the default message DEFAULT_MESSAGE.
IllegalNumberRangeException(String value, BigDecimal min, BigDecimal max)
          Constructs an IllegalNumberRangeException with the message MESSAGE_WITH_VALUES including the given values of the arguments.
IllegalNumberRangeException(String value, BigDecimal min, BigDecimal max, Throwable cause)
          Constructs a new exception with the message MESSAGE_WITH_VALUES including the given values of the arguments.
IllegalNumberRangeException(String value, BigInteger min, BigInteger max)
          Constructs an IllegalNumberRangeException with the message MESSAGE_WITH_VALUES including the given values of the arguments.
IllegalNumberRangeException(String value, BigInteger min, BigInteger max, Throwable cause)
          Constructs a new exception with the message MESSAGE_WITH_VALUES including the given values of the arguments.
IllegalNumberRangeException(Throwable cause)
          Constructs a new exception with the default message DEFAULT_MESSAGE.
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MESSAGE

protected static final String DEFAULT_MESSAGE
Default message to indicate that the a given arguments are not in the valid range of the datatype.

See Also:
Constant Field Values

MESSAGE_WITH_VALUES

protected static final String MESSAGE_WITH_VALUES
Message to indicate that the the given arguments must be in the valid range for the datatype.

See Also:
Constant Field Values
Constructor Detail

IllegalNumberRangeException

public IllegalNumberRangeException()
Constructs an IllegalNumberRangeException with the default message DEFAULT_MESSAGE.


IllegalNumberRangeException

public IllegalNumberRangeException(String value,
                                   BigDecimal min,
                                   BigDecimal max)
Constructs an IllegalNumberRangeException with the message MESSAGE_WITH_VALUES including the given values of the arguments.

Parameters:
value - the value which is not in the range as String
min - the min value of the range
max - the max value of the range

IllegalNumberRangeException

public IllegalNumberRangeException(String value,
                                   BigInteger min,
                                   BigInteger max)
Constructs an IllegalNumberRangeException with the message MESSAGE_WITH_VALUES including the given values of the arguments.

Parameters:
value - the value which is not in the range as String
min - the min value of the range
max - the max value of the range

IllegalNumberRangeException

public IllegalNumberRangeException(String value,
                                   BigInteger min,
                                   BigInteger max,
                                   @Nullable
                                   Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_VALUES including the given values of the arguments.

Parameters:
value - the value which is not in the range as String
min - the min value of the range
max - the max value of the range
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

IllegalNumberRangeException

public IllegalNumberRangeException(String value,
                                   BigDecimal min,
                                   BigDecimal max,
                                   @Nullable
                                   Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_VALUES including the given values of the arguments.

Parameters:
value - the value which is not in the range as String
min - the min value of the range
max - the max value of the range
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

IllegalNumberRangeException

public IllegalNumberRangeException(@Nullable
                                   Throwable cause)
Constructs a new exception with the default message DEFAULT_MESSAGE.

Parameters:
cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)


Copyright © 2012-2013. All Rights Reserved.