|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.hp.hpl.jena.util.OneToManyMap
An extension to a standard map that supports one-to-many mappings: that is, there may be zero, one or many values corresponding to a given key.
| Inner Class Summary | |
class |
OneToManyMap.Entry
Helper class to implement the Map.Entry interface to enumerate entries in the map |
| Inner classes inherited from class java.util.Map |
java.util.Map.Entry |
| Constructor Summary | |
OneToManyMap()
|
|
| Method Summary | |
void |
clear()
Clear all entries from the map. |
boolean |
containsKey(java.lang.Object key)
Answer true if the map contains the given value as a key. |
boolean |
containsValue(java.lang.Object value)
Answer true if the map contains the given object as a value stored against any key. |
java.util.Set |
entrySet()
Answer a set of the mappings in this map. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this map for equality. |
java.lang.Object |
get(java.lang.Object key)
Get a value for this key. |
java.util.Iterator |
getAll(java.lang.Object key)
Answer an iterator over all of the values for the given key. |
int |
hashcode()
Returns the hash code value for this map. |
boolean |
isEmpty()
Answer true if the map is empty of key-value mappings. |
java.util.Set |
keySet()
Answer a set of the keys in this map |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associates the given value with the given key. |
void |
putAll(java.util.Map m)
Put all entries from one map into this. |
java.lang.Object |
remove(java.lang.Object key)
Remove all of the associations for the given key. |
void |
remove(java.lang.Object key,
java.lang.Object value)
Remove the specific association between the given key and value. |
int |
size()
Answer the number of key-value mappings in the map |
java.util.Collection |
values()
Returns a collection view of the values contained in this map. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
hashCode |
| Constructor Detail |
public OneToManyMap()
| Method Detail |
public void clear()
clear in interface java.util.Mappublic boolean containsKey(java.lang.Object key)
containsKey in interface java.util.Mapkey - The key object to test forpublic boolean containsValue(java.lang.Object value)
containsValue in interface java.util.Mapvalue - The value to test forpublic java.util.Set entrySet()
entrySet in interface java.util.Mappublic boolean equals(java.lang.Object o)
equals in interface java.util.Mapequals in class java.lang.Objecto - The object to be compared for equality with this map.public java.lang.Object get(java.lang.Object key)
get in interface java.util.Mapkey - The key to access the map.getAll(java.lang.Object)public java.util.Iterator getAll(java.lang.Object key)
key - The key objectpublic int hashcode()
public boolean isEmpty()
isEmpty in interface java.util.Mappublic java.util.Set keySet()
keySet in interface java.util.Map
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
put in interface java.util.Mapkey - The key objectvalue - The value object
public void putAll(java.util.Map m)
throws java.lang.UnsupportedOperationException
putAll in interface java.util.Mappublic java.lang.Object remove(java.lang.Object key)
remove( java.lang.Object, java.lang.Object )
instead. Has no effect if the key is not present in the map. Since no
single specific association with the key is defined, this method always
returns null.remove in interface java.util.Mapkey - All associations with this key will be removed.
public void remove(java.lang.Object key,
java.lang.Object value)
key - The key objectvalue - The value objectpublic int size()
size in interface java.util.Mappublic java.util.Collection values()
values in interface java.util.Map
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||