Package com.evolveum.midpoint.prism.path
Class PathKeyedMap<T>
java.lang.Object
com.evolveum.midpoint.prism.path.PathKeyedMap<T>
- All Implemented Interfaces:
Serializable
,Map<ItemPath,
T>
Special case of a map that has ItemPath as a key.
The main issue with path-keyed maps is that comparing item paths using equals/hashCode is
unreliable. UniformItemPath was conceived as way to improve that, but even it does not solve
this issue completely.
An alternative design to this class would be to use some wrapper class for ItemPath that would
provide equals() method with the same semantics as equivalent(). But what about hashCode then?
This map does _not_ support null keys. Also, collections returned by keySet(), values(), entrySet()
are not modifiable.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
boolean
isEmpty()
keySet()
void
int
size()
toString()
@NotNull Collection<T>
values()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
PathKeyedMap
public PathKeyedMap()
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
containsKey
- Specified by:
containsKey
in interfaceMap<ItemPath,
T>
-
containsValue
- Specified by:
containsValue
in interfaceMap<ItemPath,
T>
-
get
-
put
-
remove
-
putAll
-
clear
public void clear() -
keySet
-
values
-
entrySet
-
toString
-