Class CollectPreconditions

java.lang.Object
com.google.common.collect.CollectPreconditions

final class CollectPreconditions extends Object
Precondition checks useful in collection implementations.
  • Constructor Details

    • CollectPreconditions

      CollectPreconditions()
  • Method Details

    • checkEntryNotNull

      static void checkEntryNotNull(Object key, Object value)
    • checkNonnegative

      static int checkNonnegative(int value, String name)
    • checkNonnegative

      static long checkNonnegative(long value, String name)
    • checkPositive

      static void checkPositive(int value, String name)
    • checkRemove

      static void checkRemove(boolean canRemove)
      Precondition tester for Iterator.remove() that throws an exception with a consistent error message.