Package com.google.common.collect
Class CollectPreconditions
- java.lang.Object
-
- com.google.common.collect.CollectPreconditions
-
final class CollectPreconditions extends java.lang.ObjectPrecondition 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 voidcheckEntryNotNull(java.lang.Object key, java.lang.Object value)(package private) static intcheckNonnegative(int value, java.lang.String name)(package private) static longcheckNonnegative(long value, java.lang.String name)(package private) static voidcheckPositive(int value, java.lang.String name)(package private) static voidcheckRemove(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.
-
-