public interface TypesafeMap
Modifier and Type | Interface and Description |
---|---|
static interface |
TypesafeMap.Key<VALUE>
Base type of keys for the map.
|
Modifier and Type | Method and Description |
---|---|
<VALUE> boolean |
containsKey(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
Returns true if contains the given key.
|
<VALUE> VALUE |
get(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
Returns the value associated with the given key or null if
none is provided.
|
java.util.Set<java.lang.Class<?>> |
keySet()
Collection of keys currently held in this map.
|
<VALUE> VALUE |
remove(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
Removes the given key from the map, returning the value removed.
|
<VALUE> VALUE |
set(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key,
VALUE value)
Associates the given value with the given type for future calls
to get.
|
int |
size()
Returns the number of keys in the map.
|
<VALUE> VALUE get(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
<VALUE> VALUE set(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key, VALUE value)
<VALUE> VALUE remove(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
java.util.Set<java.lang.Class<?>> keySet()
<VALUE> boolean containsKey(java.lang.Class<? extends TypesafeMap.Key<VALUE>> key)
int size()