javatools.datatypes
Class MultiMap<A,B>

java.lang.Object
  extended by javatools.datatypes.MultiMap<A,B>
All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<A,B>>

public class MultiMap<A,B>
extends java.lang.Object
implements java.lang.Iterable<java.util.Map.Entry<A,B>>

This class is part of the Java Tools (see http://mpii.de/yago-naga/javatools). It is licensed under the Creative Commons Attribution License (see http://creativecommons.org/licenses/by/3.0) by the YAGO-NAGA team (see http://mpii.de/yago-naga). This class can be used to keep track of a non-functional, directed relation


Constructor Summary
MultiMap()
           
MultiMap(int initialSize)
           
 
Method Summary
 boolean contains(java.util.Map.Entry<A,B> e)
           
 java.util.Set<B> get(A a)
           
 boolean isEmpty()
           
 java.util.Iterator<java.util.Map.Entry<A,B>> iterator()
           
 void put(A a, B b)
           
 void putAll(MultiMap<A,B> otherMap)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiMap

public MultiMap()

MultiMap

public MultiMap(int initialSize)
Method Detail

put

public void put(A a,
                B b)

putAll

public void putAll(MultiMap<A,B> otherMap)

get

public java.util.Set<B> get(A a)

contains

public boolean contains(java.util.Map.Entry<A,B> e)

isEmpty

public boolean isEmpty()

iterator

public java.util.Iterator<java.util.Map.Entry<A,B>> iterator()
Specified by:
iterator in interface java.lang.Iterable<java.util.Map.Entry<A,B>>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object