Package zombie.util.util
Class Exceptions
java.lang.Object
zombie.util.util.Exceptions
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.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
cannotAdapt
(String name) static void
cannotMergeRanges
(Object r1, Object r2) static void
cloning()
static void
static void
static void
static void
static void
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
static void
static void
static void
static void
noSuchMapping
(Object key) static void
nullArgument
(String name) static void
static void
static void
static void
static void
unmodifiable
(String name) static void
unsupported
(String name) static void
valueNotInSubRange
(Object value)
-
Constructor Details
-
Exceptions
public Exceptions()
-
-
Method Details
-
indexOutOfBounds
- Throws:
IndexOutOfBoundsException
-
nullArgument
- Throws:
NullPointerException
-
negativeArgument
- Throws:
IllegalArgumentException
-
negativeOrZeroArgument
public static void negativeOrZeroArgument(String name, Object value) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
endOfIterator
- Throws:
NoSuchElementException
-
startOfIterator
- Throws:
NoSuchElementException
-
noElementToRemove
- Throws:
IllegalStateException
-
noElementToGet
- Throws:
IllegalStateException
-
noElementToSet
- Throws:
IllegalStateException
-
noLastElement
- Throws:
IllegalStateException
-
noSuchMapping
- Throws:
NoSuchMappingException
-
dequeNoFirst
- Throws:
IndexOutOfBoundsException
-
dequeNoLast
- Throws:
IndexOutOfBoundsException
-
dequeNoFirstToRemove
- Throws:
IndexOutOfBoundsException
-
dequeNoLastToRemove
- Throws:
IndexOutOfBoundsException
-
nullElementNotAllowed
- Throws:
IllegalArgumentException
-
cannotAdapt
- Throws:
IllegalStateException
-
unsupported
- Throws:
UnsupportedOperationException
-
unmodifiable
- Throws:
UnsupportedOperationException
-
cloning
- Throws:
RuntimeException
-
invalidRangeBounds
- Throws:
IllegalArgumentException
-
cannotMergeRanges
- Throws:
IllegalArgumentException
-
setNoFirst
- Throws:
NoSuchElementException
-
setNoLast
- Throws:
NoSuchElementException
-
invalidSetBounds
- Throws:
IllegalArgumentException
-
valueNotInSubRange
- Throws:
IllegalArgumentException
-
invalidUpperBound
- Throws:
IllegalArgumentException
-
invalidLowerBound
- Throws:
IllegalArgumentException
-