Enum MapFeature

  • All Implemented Interfaces:
    Feature<java.util.Map>, java.io.Serializable, java.lang.Comparable<MapFeature>

    @GwtCompatible
    public enum MapFeature
    extends java.lang.Enum<MapFeature>
    implements Feature<java.util.Map>
    Optional features of classes derived from Map.
    • Enum Constant Detail

      • ALLOWS_NULL_KEY_QUERIES

        public static final MapFeature ALLOWS_NULL_KEY_QUERIES
        The map does not throw NullPointerException on calls such as containsKey(null), get(null), keySet().contains(null) or remove(null).
      • ALLOWS_NULL_KEYS

        public static final MapFeature ALLOWS_NULL_KEYS
      • ALLOWS_NULL_VALUE_QUERIES

        public static final MapFeature ALLOWS_NULL_VALUE_QUERIES
        The map does not throw NullPointerException on calls such as containsValue(null), values().contains(null) or values().remove(null).
      • ALLOWS_NULL_VALUES

        public static final MapFeature ALLOWS_NULL_VALUES
      • ALLOWS_NULL_ENTRY_QUERIES

        public static final MapFeature ALLOWS_NULL_ENTRY_QUERIES
        The map does not throw NullPointerException on calls such as entrySet().contains(null) or entrySet().remove(null)
      • RESTRICTS_KEYS

        public static final MapFeature RESTRICTS_KEYS
      • RESTRICTS_VALUES

        public static final MapFeature RESTRICTS_VALUES
      • SUPPORTS_PUT

        public static final MapFeature SUPPORTS_PUT
      • SUPPORTS_REMOVE

        public static final MapFeature SUPPORTS_REMOVE
      • FAILS_FAST_ON_CONCURRENT_MODIFICATION

        public static final MapFeature FAILS_FAST_ON_CONCURRENT_MODIFICATION
      • REJECTS_DUPLICATES_AT_CREATION

        public static final MapFeature REJECTS_DUPLICATES_AT_CREATION
        Indicates that the constructor or factory method of a map, usually an immutable map, throws an IllegalArgumentException when presented with duplicate keys instead of discarding all but one.
      • GENERAL_PURPOSE

        public static final MapFeature GENERAL_PURPOSE
    • Method Detail

      • values

        public static MapFeature[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MapFeature c : MapFeature.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MapFeature valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getImpliedFeatures

        public java.util.Set<Feature<? super java.util.Map>> getImpliedFeatures()
        Description copied from interface: Feature
        Returns the set of features that are implied by this feature.
        Specified by:
        getImpliedFeatures in interface Feature<java.util.Map>