it.tidalwave.util
Class TypeSafeHashMap

Package class diagram package TypeSafeHashMap
java.lang.Object
  extended by it.tidalwave.util.TypeSafeHashMap
All Implemented Interfaces:
TypeSafeMap, Serializable, Iterable<Object>

@Immutable
public class TypeSafeHashMap
extends Object
implements TypeSafeMap, Serializable

Version:
$Id$
Author:
Fabrizio Giudici
See Also:
Serialized Form
Status: draft API

Constructor Summary
TypeSafeHashMap(Map<Key<?>,Object> map)
           
 
Method Summary
 Map<Key<?>,Object> asMap()
          
 boolean containsKey(Key<?> key)
          
<T> T
get(Key<T> key)
          
 Set<Key<?>> getKeys()
          
 int getSize()
          
 Iterator<Object> iterator()
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeSafeHashMap

public TypeSafeHashMap(@Nonnull
                       Map<Key<?>,Object> map)
Method Detail

get

@Nonnull
public <T> T get(@Nonnull
                         Key<T> key)
      throws NotFoundException

Specified by:
get in interface TypeSafeMap
Throws:
NotFoundException

containsKey

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

Specified by:
containsKey in interface TypeSafeMap

getKeys

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

Specified by:
getKeys in interface TypeSafeMap

getSize

@Nonnegative
public int getSize()

Specified by:
getSize in interface TypeSafeMap

iterator

@Nonnull
public Iterator<Object> iterator()

Specified by:
iterator in interface Iterable<Object>

asMap

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

Specified by:
asMap in interface TypeSafeMap

toString

@Nonnull
public String toString()

Overrides:
toString in class Object


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