org.openstreetmap.josm.data.osm
Class Storage<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractSet<T>
          extended by org.openstreetmap.josm.data.osm.Storage<T>
All Implemented Interfaces:
java.lang.Iterable<T>, java.util.Collection<T>, java.util.Set<T>

public class Storage<T>
extends java.util.AbstractSet<T>

A Set-like class that allows looking up equivalent preexising instance. It is useful whereever one would use self-mapping construct like Map.put(t,t), that is, for caches, uniqueness filters or similar. The semantics of equivalency can be external to the object, using the Hash interface. The set also supports querying for entries using different key type, in case you can provide a Hash implementation that can resolve the equality.

Examples