KeyType
- the type of object used as keysValueType
- the type of object stored as valuespublic class ValueTypeIndexedMap<KeyType,ValueType> extends Object implements Map<KeyType,ValueType>
Constructor and Description |
---|
ValueTypeIndexedMap()
Constructor.
|
ValueTypeIndexedMap(Collection<Class> newTypes)
Constructor.
|
ValueTypeIndexedMap(Map<KeyType,ValueType> newMap,
Collection<Class> newTypes)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<KeyType,ValueType>> |
entrySet() |
ValueType |
get(Object key) |
Set<Class> |
getTypes()
Get the value types that are indexed.
|
boolean |
isEmpty() |
Set<KeyType> |
keySet() |
ValueType |
put(KeyType key,
ValueType value) |
void |
putAll(Map<? extends KeyType,? extends ValueType> t) |
void |
rebuildIndex()
Rebuild internal index.
|
ValueType |
remove(Object key) |
void |
setTypes(Collection<Class> newTypes)
Set which value types are indexed.
|
int |
size() |
<SubType extends ValueType> |
subMap(Class<SubType> type)
Returns an unmodifiable map of the entries whose value is of the specified type.
|
String |
toString() |
Collection<ValueType> |
values() |
public ValueTypeIndexedMap()
public ValueTypeIndexedMap(Map<KeyType,ValueType> newMap, Collection<Class> newTypes)
newMap
- existing map to build from.newTypes
- collection of value types to indexpublic ValueTypeIndexedMap(Collection<Class> newTypes)
newTypes
- collection of value types to indexpublic boolean containsKey(Object key)
containsKey
in interface Map<KeyType,ValueType>
public boolean containsValue(Object value)
containsValue
in interface Map<KeyType,ValueType>
public Set<Class> getTypes()
public void rebuildIndex()
public void setTypes(Collection<Class> newTypes)
newTypes
- which value types are indexedpublic <SubType extends ValueType> Map<KeyType,SubType> subMap(Class<SubType> type)
SubType
- type of values to include in the returned maptype
- type of values to returnCopyright © 2013 JBoss by Red Hat. All Rights Reserved.