Class PathKeyedMap<T>

  • All Implemented Interfaces:
    Serializable, Map<ItemPath,​T>

    public class PathKeyedMap<T>
    extends Object
    implements Map<ItemPath,​T>, Serializable
    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:
    Serialized Form