Enum Class CheckedContainer.Mutability

All Implemented Interfaces:
Serializable, Comparable<Checked­Container​.Mutability>, Constable
Enclosing interface:
Checked­Container<E>

public static enum CheckedContainer.Mutability extends Enum<CheckedContainer.Mutability>
Mutability status of a container.
Since:
1.6
  • Enum Constant Details

  • Method Details

    • values

      public static CheckedContainer.Mutability[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CheckedContainer.Mutability valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      Illegal­Argument­Exception - if this enum class has no constant with the specified name
      Null­Pointer­Exception - if the argument is null
    • of

      public static CheckedContainer.Mutability of(Collection<?> collection)
      Returns the mutability status of the given collection. If the given collection implements the Checked­Container interface, then this method returns the Checked­Container​.get­Mutability() status. Otherwise, this method tries to guess from the implementation class. In case of doubt, this method returns UNKNOWN.
      Parameters:
      collection - the collection for which to get the mutability status.
      Returns:
      mutability status of the given collection.