Package com.uwyn.jhighlight.pcj.util
Class Exceptions
- java.lang.Object
-
- com.uwyn.jhighlight.pcj.util.Exceptions
-
public class Exceptions extends Object
This class provides static methods for throwing exceptions. It is only provided as a utility class for the collection implementations and is not a part of the API.- Version:
- 1.0 21-08-2003 18:44
- Author:
- Søren Bak
-
-
Constructor Summary
Constructors Constructor Description Exceptions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cannotAdapt(String name)
static void
cannotMergeRanges(Object r1, Object r2)
static void
cloning()
static void
dequeNoFirst()
static void
dequeNoFirstToRemove()
static void
dequeNoLast()
static void
dequeNoLastToRemove()
static void
endOfIterator()
static void
indexOutOfBounds(int index, int low, int high)
static void
invalidLowerBound(Object value)
static void
invalidRangeBounds(Object first, Object last)
static void
invalidSetBounds(Object low, Object high)
static void
invalidUpperBound(Object value)
static void
negativeArgument(String name, Object value)
static void
negativeOrZeroArgument(String name, Object value)
static void
noElementToGet()
static void
noElementToRemove()
static void
noElementToSet()
static void
noLastElement()
static void
noSuchMapping(Object key)
static void
nullArgument(String name)
static void
nullElementNotAllowed()
static void
setNoFirst()
static void
setNoLast()
static void
startOfIterator()
static void
unmodifiable(String name)
static void
unsupported(String name)
static void
valueNotInSubRange(Object value)
-
-
-
Method Detail
-
indexOutOfBounds
public static void indexOutOfBounds(int index, int low, int high) throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
nullArgument
public static void nullArgument(String name) throws NullPointerException
- Throws:
NullPointerException
-
negativeArgument
public static void negativeArgument(String name, Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
negativeOrZeroArgument
public static void negativeOrZeroArgument(String name, Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
endOfIterator
public static void endOfIterator() throws NoSuchElementException
- Throws:
NoSuchElementException
-
startOfIterator
public static void startOfIterator() throws NoSuchElementException
- Throws:
NoSuchElementException
-
noElementToRemove
public static void noElementToRemove() throws IllegalStateException
- Throws:
IllegalStateException
-
noElementToGet
public static void noElementToGet() throws IllegalStateException
- Throws:
IllegalStateException
-
noElementToSet
public static void noElementToSet() throws IllegalStateException
- Throws:
IllegalStateException
-
noLastElement
public static void noLastElement() throws IllegalStateException
- Throws:
IllegalStateException
-
noSuchMapping
public static void noSuchMapping(Object key) throws NoSuchMappingException
- Throws:
NoSuchMappingException
-
dequeNoFirst
public static void dequeNoFirst() throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
dequeNoLast
public static void dequeNoLast() throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
dequeNoFirstToRemove
public static void dequeNoFirstToRemove() throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
dequeNoLastToRemove
public static void dequeNoLastToRemove() throws IndexOutOfBoundsException
- Throws:
IndexOutOfBoundsException
-
nullElementNotAllowed
public static void nullElementNotAllowed() throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
cannotAdapt
public static void cannotAdapt(String name) throws IllegalStateException
- Throws:
IllegalStateException
-
unsupported
public static void unsupported(String name) throws UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
unmodifiable
public static void unmodifiable(String name) throws UnsupportedOperationException
- Throws:
UnsupportedOperationException
-
cloning
public static void cloning() throws RuntimeException
- Throws:
RuntimeException
-
invalidRangeBounds
public static void invalidRangeBounds(Object first, Object last) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
cannotMergeRanges
public static void cannotMergeRanges(Object r1, Object r2) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
setNoFirst
public static void setNoFirst() throws NoSuchElementException
- Throws:
NoSuchElementException
-
setNoLast
public static void setNoLast() throws NoSuchElementException
- Throws:
NoSuchElementException
-
invalidSetBounds
public static void invalidSetBounds(Object low, Object high) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
valueNotInSubRange
public static void valueNotInSubRange(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
invalidUpperBound
public static void invalidUpperBound(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
invalidLowerBound
public static void invalidLowerBound(Object value) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
-