it.tidalwave.util
Class TypeSafeHashMultiMap

Package class diagram package TypeSafeHashMultiMap
java.lang.Object
  extended by 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
TypeSafeHashMultiMap(Map<Key<?>,Collection<?>> map)
           
 
Method Summary
 Map<Key<?>,Collection<?>> asMap()
          
 boolean containsKey(Key<?> key)
          
<T> Collection<T>
get(Key<T> key)
          
 Set<Key<?>> getKeys()
          
 int getSize()
          
 Iterator<Collection<?>> iterator()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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:
get in interface TypeSafeMultiMap

containsKey

public boolean containsKey(@Nonnull
                           Key<?> key)

Specified by:
containsKey in interface TypeSafeMultiMap

getKeys

@Nonnull
public Set<Key<?>> getKeys()

Specified by:
getKeys in interface TypeSafeMultiMap

getSize

@Nonnegative
public int getSize()

Specified by:
getSize in interface TypeSafeMultiMap

iterator

@Nonnull
public Iterator<Collection<?>> iterator()

Specified by:
iterator in interface Iterable<Collection<? extends Object>>

asMap

@Nonnull
public Map<Key<?>,Collection<?>> asMap()

Specified by:
asMap in interface TypeSafeMultiMap

toString

@Nonnull
public String toString()

Overrides:
toString in class Object


Copyright © 2009-2012 Tidalwave s.a.s.. All Rights Reserved.