Top Description Constructors Methods
com.google.common.collect

pack-priv final Class CollectPreconditions

extends Object
Class Inheritance
Annotations
@GwtCompatible
@ElementTypesAreNonnullByDefault
Static Imports
com.google.common.base.Preconditions.checkState

Precondition checks useful in collection implementations.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
pack-priv static int
checkNonnegative(int value, String name)

pack-priv static long
checkNonnegative(long value, String name)

pack-priv static void
checkPositive(int value, String name)

pack-priv static void
checkRemove(boolean canRemove)

Precondition tester for Iterator.remove() that throws an exception with a consistent error message.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CollectPreconditionsback to summary
pack-priv CollectPreconditions()

Method Detail

checkEntryNotNullback to summary
pack-priv static void checkEntryNotNull(Object key, Object value)
checkNonnegativeback to summary
pack-priv static int checkNonnegative(int value, String name)
Annotations
@CanIgnoreReturnValue
checkNonnegativeback to summary
pack-priv static long checkNonnegative(long value, String name)
Annotations
@CanIgnoreReturnValue
checkPositiveback to summary
pack-priv static void checkPositive(int value, String name)
checkRemoveback to summary
pack-priv static void checkRemove(boolean canRemove)

Precondition tester for Iterator.remove() that throws an exception with a consistent error message.