Class HashMultimap<A,B>

java.lang.Object
eu.bandm.tools.util.multi.MapMultimap<A,B>
eu.bandm.tools.util.multi.HashMultimap<A,B>
All Implemented Interfaces:
Multimap<A,B>, Serializable, Iterable<Map.Entry<A,B>>, Collection<Map.Entry<A,B>>, BiPredicate<A,B>, Set<Map.Entry<A,B>>

public class HashMultimap<A,B> extends MapMultimap<A,B> implements Serializable
An Implementation where both directions of look-up are realized by hashing.
See Also:
  • Constructor Details

    • HashMultimap

      public HashMultimap()
    • HashMultimap

      public HashMultimap(Collection<? extends Map.Entry<A,B>> c)
    • HashMultimap

      public HashMultimap(Map<A,B> m)
    • HashMultimap

      public HashMultimap(HashMultimap<A,B> r)
  • Method Details

    • createForwardSet

      protected Set<B> createForwardSet()
      Description copied from class: MapMultimap
      Must be implemented by each subclass. This method is called to create the image set for every "A a" added. When the map A->Set<B> is sorted, then this set should also be.
      Specified by:
      createForwardSet in class MapMultimap<A,B>
    • createBackwardSet

      protected Set<A> createBackwardSet()
      Description copied from class: MapMultimap
      Must be implemented by each subclass. This method is called to create the preimage set for every new "B b" added. When the map B->Set<A> is sorted, then this set should also be.
      Specified by:
      createBackwardSet in class MapMultimap<A,B>