|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
BASE
- A type-checking parameter that ensures that all keys
given to get, has, set, etc., are appropriate for this particular
TypesafeMap.public interface TypesafeMap<BASE>
Type signature for a class that supports the basic operations required of a typesafe heterogeneous map.
Nested Class Summary | |
---|---|
static interface |
TypesafeMap.Key<BASE,VALUE>
Base type of keys for the map. |
Method Summary | ||
---|---|---|
|
containsKey(java.lang.Class<KEY> key)
Returns true if contains the given key. |
|
|
get(java.lang.Class<KEY> key)
Returns the value associated with the given key or null if none is provided. |
|
|
has(java.lang.Class<KEY> key)
Returns true if the map contains the given key. |
|
java.util.Set<java.lang.Class<?>> |
keySet()
Collection of keys currently held in this map. |
|
|
remove(java.lang.Class<KEY> key)
Removes the given key from the map, returning the value removed. |
|
|
set(java.lang.Class<KEY> 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. |
Method Detail |
---|
<VALUE,KEY extends TypesafeMap.Key<BASE,VALUE>> boolean has(java.lang.Class<KEY> key)
<VALUE,KEY extends TypesafeMap.Key<BASE,VALUE>> VALUE get(java.lang.Class<KEY> key)
<VALUEBASE,VALUE extends VALUEBASE,KEY extends TypesafeMap.Key<BASE,VALUEBASE>> VALUE set(java.lang.Class<KEY> key, VALUE value)
<VALUE,KEY extends TypesafeMap.Key<BASE,VALUE>> VALUE remove(java.lang.Class<KEY> key)
java.util.Set<java.lang.Class<?>> keySet()
<VALUE,KEY extends TypesafeMap.Key<CoreMap,VALUE>> boolean containsKey(java.lang.Class<KEY> key)
int size()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |