|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgrinda.impl.tuplespace.SimpleContainer
public class SimpleContainer
This is a simple implementation of a TupleContainer using a vector to store objects. It is used instead of the HashContainer to store few tuples with better memory consumption.
Constructor Summary | |
---|---|
SimpleContainer(InternalTuple absoluteTemplate)
|
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 SimpleContainer(InternalTuple absoluteTemplate)
Method Detail |
---|
public void add(InternalTuple t)
TupleContainer
add
in interface TupleContainer
t
- the tuplepublic InternalTuple[] lookupAll(InternalTuple pattern)
TupleContainer
lookupAll
in interface TupleContainer
pattern
- the template
public InternalTuple lookup(InternalTuple pattern)
TupleContainer
lookup
in interface TupleContainer
pattern
- the template
public InternalTuple remove(InternalTuple pattern)
TupleContainer
remove
in interface TupleContainer
pattern
- the template
public InternalTuple[] removeAll(InternalTuple pattern)
TupleContainer
removeAll
in interface TupleContainer
pattern
- the template
public InternalTuple getAbsoluteTemplate()
public int size()
TupleContainer
size
in interface TupleContainer
public boolean isEmpty()
TupleContainer
isEmpty
in interface TupleContainer
public java.util.Collection tuples()
TupleContainer
tuples
in interface TupleContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |