Package com.google.common.collect
Class CollectPreconditions
- java.lang.Object
-
- com.google.common.collect.CollectPreconditions
-
@GwtCompatible final class CollectPreconditions extends java.lang.Object
Precondition checks useful in collection implementations.
-
-
Constructor Summary
Constructors Constructor Description CollectPreconditions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
checkEntryNotNull(java.lang.Object key, java.lang.Object value)
(package private) static int
checkNonnegative(int value, java.lang.String name)
(package private) static long
checkNonnegative(long value, java.lang.String name)
(package private) static void
checkPositive(int value, java.lang.String name)
(package private) static void
checkRemove(boolean canRemove)
Precondition tester forIterator.remove()
that throws an exception with a consistent error message.
-
-
-
Method Detail
-
checkEntryNotNull
static void checkEntryNotNull(java.lang.Object key, java.lang.Object value)
-
checkNonnegative
static int checkNonnegative(int value, java.lang.String name)
-
checkNonnegative
static long checkNonnegative(long value, java.lang.String name)
-
checkPositive
static void checkPositive(int value, java.lang.String name)
-
checkRemove
static void checkRemove(boolean canRemove)
Precondition tester forIterator.remove()
that throws an exception with a consistent error message.
-
-