Enum MapFeature
- All Implemented Interfaces:
Feature<Map>
,Serializable
,Comparable<MapFeature>
,java.lang.constant.Constable
Optional features of classes derived from
Map
.- Author:
- George van den Driessche
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe map does not throwNullPointerException
on anynull
queries.The map does not throwNullPointerException
on calls such asentrySet().contains(null)
orentrySet().remove(null)
The map does not throwNullPointerException
on calls such ascontainsKey(null)
,get(null)
,keySet().contains(null)
orremove(null)
.The map does not throwNullPointerException
on calls such ascontainsValue(null)
,values().contains(null)
orvalues().remove(null)
.Indicates that the constructor or factory method of a map, usually an immutable map, throws anIllegalArgumentException
when presented with duplicate keys instead of discarding all but one. -
Method Summary
Modifier and TypeMethodDescriptionReturns the set of features that are implied by this feature.static MapFeature
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.
-
Enum Constant Details
-
ALLOWS_NULL_KEY_QUERIES
The map does not throwNullPointerException
on calls such ascontainsKey(null)
,get(null)
,keySet().contains(null)
orremove(null)
. -
ALLOWS_NULL_KEYS
-
ALLOWS_NULL_VALUE_QUERIES
The map does not throwNullPointerException
on calls such ascontainsValue(null)
,values().contains(null)
orvalues().remove(null)
. -
ALLOWS_NULL_VALUES
-
ALLOWS_NULL_ENTRY_QUERIES
The map does not throwNullPointerException
on calls such asentrySet().contains(null)
orentrySet().remove(null)
-
ALLOWS_ANY_NULL_QUERIES
The map does not throwNullPointerException
on anynull
queries.- See Also:
-
RESTRICTS_KEYS
-
RESTRICTS_VALUES
-
SUPPORTS_PUT
-
SUPPORTS_REMOVE
-
FAILS_FAST_ON_CONCURRENT_MODIFICATION
-
REJECTS_DUPLICATES_AT_CREATION
Indicates that the constructor or factory method of a map, usually an immutable map, throws anIllegalArgumentException
when presented with duplicate keys instead of discarding all but one. -
GENERAL_PURPOSE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getImpliedFeatures
-