public enum MapFeature extends java.lang.Enum<MapFeature> implements Feature<java.util.Map>
Map.| Modifier and Type | Class and Description |
|---|---|
static interface |
MapFeature.Require |
| Enum Constant and Description |
|---|
ALLOWS_ANY_NULL_QUERIES
The map does not throw
NullPointerException on any null queries. |
ALLOWS_NULL_ENTRY_QUERIES
The map does not throw
NullPointerException on calls such as entrySet().contains(null) or entrySet().remove(null) |
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 |
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 |
FAILS_FAST_ON_CONCURRENT_MODIFICATION |
GENERAL_PURPOSE |
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. |
RESTRICTS_KEYS |
RESTRICTS_VALUES |
SUPPORTS_PUT |
SUPPORTS_REMOVE |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set<Feature<? super java.util.Map>> |
implied |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<Feature<? super java.util.Map>> |
getImpliedFeatures()
Returns the set of features that are implied by this feature.
|
static MapFeature |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static MapFeature[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MapFeature ALLOWS_NULL_KEY_QUERIES
NullPointerException on calls such as containsKey(null),
get(null), keySet().contains(null) or remove(null).public static final MapFeature ALLOWS_NULL_KEYS
public static final MapFeature ALLOWS_NULL_VALUE_QUERIES
NullPointerException on calls such as containsValue(null), values().contains(null) or values().remove(null).public static final MapFeature ALLOWS_NULL_VALUES
public static final MapFeature ALLOWS_NULL_ENTRY_QUERIES
NullPointerException on calls such as entrySet().contains(null) or entrySet().remove(null)public static final MapFeature ALLOWS_ANY_NULL_QUERIES
NullPointerException on any null queries.public static final MapFeature RESTRICTS_KEYS
public static final MapFeature RESTRICTS_VALUES
public static final MapFeature SUPPORTS_PUT
public static final MapFeature SUPPORTS_REMOVE
public static final MapFeature FAILS_FAST_ON_CONCURRENT_MODIFICATION
public static final MapFeature REJECTS_DUPLICATES_AT_CREATION
IllegalArgumentException when presented with duplicate keys instead of discarding all
but one.public static final MapFeature GENERAL_PURPOSE
private final java.util.Set<Feature<? super java.util.Map>> implied
public static MapFeature[] values()
for (MapFeature c : MapFeature.values()) System.out.println(c);
public static MapFeature valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.util.Set<Feature<? super java.util.Map>> getImpliedFeatures()
FeaturegetImpliedFeatures in interface Feature<java.util.Map>