|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object grinda.impl.tuplespace.HashContainer
public class HashContainer
A tuple container implementd with an Hashtables
Constructor Summary | |
---|---|
HashContainer(InternalTuple absoluteTemplate)
Creates a new HashContainer that will store tuples with the given absolute template |
Method Summary | |
---|---|
void |
add(InternalTuple t)
Adds an InternalTuple to the container |
InternalTuple |
getAbsoluteTemplate()
|
boolean |
isEmpty()
Checks if the container is empty |
InternalTuple |
lookup(InternalTuple pattern)
Looks up a tuples that match the given template using the associative matching |
InternalTuple[] |
lookupAll(InternalTuple pattern)
Looks up all the tuples that match the given template using the associative matching |
InternalTuple |
remove(InternalTuple pattern)
Removes a the tuple that match the given template using the associative matching |
InternalTuple[] |
removeAll(InternalTuple pattern)
Removes all the tuples that match the given template using the associative matching |
int |
size()
Gets the number of tuple stored |
java.util.Collection |
tuples()
Gets a collection of all the tuple stored |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashContainer(InternalTuple absoluteTemplate)
absoluteTemplate
- the templateMethod Detail |
---|
public void add(InternalTuple t)
add
in interface TupleContainer
t
- the tuplepublic InternalTuple[] lookupAll(InternalTuple pattern)
lookupAll
in interface TupleContainer
pattern
- the template
public InternalTuple lookup(InternalTuple pattern)
lookup
in interface TupleContainer
pattern
- the template
public InternalTuple remove(InternalTuple pattern)
remove
in interface TupleContainer
pattern
- the template
public InternalTuple[] removeAll(InternalTuple pattern)
removeAll
in interface TupleContainer
pattern
- the template
public int size()
size
in interface TupleContainer
public boolean isEmpty()
isEmpty
in interface TupleContainer
public java.util.Collection tuples()
tuples
in interface TupleContainer
public InternalTuple getAbsoluteTemplate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |