|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException net.sf.qualitycheck.exception.IllegalRangeException
public class IllegalRangeException
Thrown to indicate that a method has been passed with a range as arguments. A range (start, end, size) is valid if the following conditions are true: - start < size - end < size - start < end
Field Summary | |
---|---|
protected static String |
DEFAULT_MESSAGE
Default message to indicate that the a given arguments are no valid range. |
protected static String |
MESSAGE_WITH_VALUES
Message to indicate that the the given arguments start, end and size must be a valid range. |
Constructor Summary | |
---|---|
IllegalRangeException()
Constructs an IllegalRangeException with the default message
DEFAULT_MESSAGE . |
|
IllegalRangeException(int start,
int end,
int size)
Constructs an IllegalRangeException with the message MESSAGE_WITH_VALUES
including the given values of the arguments. |
|
IllegalRangeException(int start,
int end,
int size,
Throwable cause)
Constructs a new exception with the message MESSAGE_WITH_VALUES including the given
values of the arguments. |
|
IllegalRangeException(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 |
---|
protected static final String DEFAULT_MESSAGE
protected static final String MESSAGE_WITH_VALUES
Constructor Detail |
---|
public IllegalRangeException()
IllegalRangeException
with the default message
DEFAULT_MESSAGE
.
public IllegalRangeException(int start, int end, int size)
IllegalRangeException
with the message MESSAGE_WITH_VALUES
including the given values of the arguments.
start
- the start value of the invalid rangeend
- the end value of the invalid rangesize
- the size value of the invalid rangepublic IllegalRangeException(int start, int end, int size, @Nullable Throwable cause)
MESSAGE_WITH_VALUES
including the given
values of the arguments.
start
- the start value of the invalid rangeend
- the end value of the invalid rangesize
- the size value of the invalid rangecause
- 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.)public IllegalRangeException(@Nullable Throwable cause)
DEFAULT_MESSAGE
.
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.)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |