Package it.tidalwave.util
Class TypeSafeHashMultiMap
- java.lang.Object
-
- it.tidalwave.util.TypeSafeHashMultiMap
-
- All Implemented Interfaces:
TypeSafeMultiMap,Serializable,Iterable<Collection<? extends Object>>
@Immutable public class TypeSafeHashMultiMap extends Object implements TypeSafeMultiMap, Serializable
- Version:
- $Id$
- Author:
- Fabrizio Giudici
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypeSafeHashMultiMap(Map<Key<?>,Collection<?>> map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Key<?>,Collection<?>>asMap()booleancontainsKey(Key<?> key)<T> Collection<T>get(Key<T> key)Set<Key<?>>getKeys()intgetSize()Iterator<Collection<?>>iterator()StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
TypeSafeHashMultiMap
public TypeSafeHashMultiMap(@Nonnull Map<Key<?>,Collection<?>> map)
-
-
Method Detail
-
get
@Nonnull public <T> Collection<T> get(@Nonnull Key<T> key)
- Specified by:
getin interfaceTypeSafeMultiMap
-
containsKey
public boolean containsKey(@Nonnull Key<?> key)
- Specified by:
containsKeyin interfaceTypeSafeMultiMap
-
getKeys
@Nonnull public Set<Key<?>> getKeys()
- Specified by:
getKeysin interfaceTypeSafeMultiMap
-
getSize
@Nonnegative public int getSize()
- Specified by:
getSizein interfaceTypeSafeMultiMap
-
iterator
@Nonnull public Iterator<Collection<?>> iterator()
- Specified by:
iteratorin interfaceIterable<Collection<? extends Object>>
-
asMap
@Nonnull public Map<Key<?>,Collection<?>> asMap()
- Specified by:
asMapin interfaceTypeSafeMultiMap
-
-