|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object grinda.common.AssociativeMap
public class AssociativeMap
Map that uses the standard associative matching semantic to store objects. Keys of this map are template that are used to look up the associated object. The look up is done with an actual tuple and all templates (with associated objects) that match the tuples are retrieved.
Constructor Summary | |
---|---|
AssociativeMap()
|
Method Summary | |
---|---|
java.util.Set |
get(InternalTuple templ)
Retrives all the key templates (with their bounded objects) matching with the given tuple. |
boolean |
isEmpty()
|
void |
put(InternalTuple templ,
java.lang.Object value)
Puts a new key in the map with an associated value |
java.lang.Object |
remove(InternalTuple templ)
Removes the oldest (first inserted) object associated with the given template |
boolean |
remove(InternalTuple templ,
java.lang.Object value)
Removes the passed key-value pair |
int |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssociativeMap()
Method Detail |
---|
public void put(InternalTuple templ, java.lang.Object value)
templ
- the template keyvalue
- the value associatedpublic java.util.Set get(InternalTuple templ)
templ
- a tuple used to the look up
public java.lang.Object remove(InternalTuple templ)
templ
- the template to match
public boolean remove(InternalTuple templ, java.lang.Object value)
templ
- the template to matchvalue
- the associated value
public int size()
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |