it.tidalwave.util
Class TypeSafeHashMultiMap

Package class diagram package TypeSafeHashMultiMap
java.lang.Object
  extended by it.tidalwave.util.TypeSafeHashMultiMap
All Implemented Interfaces:
TypeSafeMultiMap, java.lang.Iterable<java.util.Collection<? extends java.lang.Object>>

@Immutable
public class TypeSafeHashMultiMap
extends java.lang.Object
implements TypeSafeMultiMap

Version:
$Id$
Author:
Fabrizio Giudici

Constructor Summary
TypeSafeHashMultiMap(java.util.Map<Key<?>,java.util.Collection<?>> map)
           
 
Method Summary
 java.util.Map<Key<?>,java.util.Collection<?>> asMap()
          
 boolean containsKey(Key<?> key)
          
<T> java.util.Collection<T>
get(Key<T> key)
          
 java.util.Set<Key<?>> getKeys()
          
 int getSize()
          
 java.util.Iterator<java.util.Collection<?>> iterator()
          
 java.lang.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
                            java.util.Map<Key<?>,java.util.Collection<?>> map)
Method Detail

get

@Nonnull
public <T> java.util.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 java.util.Set<Key<?>> getKeys()

Specified by:
getKeys in interface TypeSafeMultiMap

getSize

@Nonnegative
public int getSize()

Specified by:
getSize in interface TypeSafeMultiMap

iterator

@Nonnull
public java.util.Iterator<java.util.Collection<?>> iterator()

Specified by:
iterator in interface java.lang.Iterable<java.util.Collection<? extends java.lang.Object>>

asMap

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

Specified by:
asMap in interface TypeSafeMultiMap

toString

@Nonnull
public java.lang.String toString()

Overrides:
toString in class java.lang.Object


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