Package com.google.common.collect
Class CollectPreconditions
java.lang.Object
com.google.common.collect.CollectPreconditions
Precondition checks useful in collection implementations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
checkEntryNotNull
(Object key, Object value) (package private) static int
checkNonnegative
(int value, String name) (package private) static long
checkNonnegative
(long value, String name) (package private) static void
checkPositive
(int value, String name) (package private) static void
checkRemove
(boolean canRemove) Precondition tester forIterator.remove()
that throws an exception with a consistent error message.
-
Constructor Details
-
CollectPreconditions
CollectPreconditions()
-
-
Method Details
-
checkEntryNotNull
-
checkNonnegative
-
checkNonnegative
-
checkPositive
-
checkRemove
static void checkRemove(boolean canRemove) Precondition tester forIterator.remove()
that throws an exception with a consistent error message.
-