jef.dna.exceptions
Class IndexOutOfRangeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by jef.dna.exceptions.IndexOutOfRangeException
All Implemented Interfaces:
java.io.Serializable

public class IndexOutOfRangeException
extends java.lang.Exception

This exception is thrown when someone tries to access a list similar data structure, specifying an invalid index. The throwing component is required to point out the valid Range.

Author:
Francesco Russo
See Also:
Serialized Form

Constructor Summary
IndexOutOfRangeException(Range validRange)
          Creates a new instance of IndexOutOfRangeException without detail message.
 
Method Summary
 Range getExpectedRange()
          Returns the violated Range.
 
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
 

Constructor Detail

IndexOutOfRangeException

public IndexOutOfRangeException(Range validRange)
Creates a new instance of IndexOutOfRangeException without detail message.

Parameters:
validRange - The violated Range
Method Detail

getExpectedRange

public Range getExpectedRange()
Returns the violated Range.

Returns:
The violated Range