|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--alice.respect.TupleSetImpl
Naive implementation of the TupleSet interface, defining the behaviour of the component managin tuple storage.
| Constructor Summary | |
TupleSetImpl()
|
|
| Method Summary | |
void |
add(Tuple t)
Adds a tuple to the multiset |
void |
beginTransaction()
Begins a transaction section Every operation on multiset can be undone |
void |
empty()
Empties the multiset |
void |
endTransaction(boolean commit)
Ends a transaction section specifying if operations must be committed or undone |
java.util.Iterator |
getIterator()
Gets an iterator to navigate through tuples of the multiset |
Tuple |
getMatchingTuple(TupleTemplate templ)
Gets (and removes) non-deterministically a tuple of the multiset matching the template specified |
boolean |
hasMatchingTuple(TupleTemplate templ)
Checks if exists a tuple inside the tuple set matching the template |
boolean |
isEmpty()
Tests if the multiset is empty |
Tuple |
readMatchingTuple(TupleTemplate templ)
Gets (wtihout removal) non-deterministically a tuple of the multiset matching the template specified |
int |
size()
Gets the number of tuples inside the multiset |
void |
sub(Tuple t)
Removes a tuple to the multiset |
java.lang.Object[] |
toArray()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TupleSetImpl()
| Method Detail |
public void add(Tuple t)
TupleSetadd in interface TupleSetalice.tuplemedium.TupleSett - the tuple to be addedpublic void sub(Tuple t)
TupleSetsub in interface TupleSetalice.tuplemedium.TupleSett - the tuple to be removedpublic boolean isEmpty()
TupleSetisEmpty in interface TupleSetpublic int size()
TupleSetsize in interface TupleSetpublic void beginTransaction()
TupleSetbeginTransaction in interface TupleSetpublic void endTransaction(boolean commit)
TupleSetendTransaction in interface TupleSetalice.tuplemedium.TupleSetcommit - if true the operations are committed, else
they are undone and the multiset is rolled back to the
state before the beginTransaction invocationpublic void empty()
TupleSetempty in interface TupleSetpublic Tuple getMatchingTuple(TupleTemplate templ)
TupleSetgetMatchingTuple in interface TupleSetalice.tuplemedium.TupleSett - the tuple template to be used for the matchingpublic Tuple readMatchingTuple(TupleTemplate templ)
TupleSetreadMatchingTuple in interface TupleSetalice.tuplemedium.TupleSett - the tuple template to be used for the matchingpublic boolean hasMatchingTuple(TupleTemplate templ)
TupleSethasMatchingTuple in interface TupleSetalice.tuplemedium.TupleSett - the tuple template to be used for the matchingtrue if a masching is found, false otherwisepublic java.util.Iterator getIterator()
TupleSetgetIterator in interface TupleSetalice.tuplemedium.TupleSetpublic java.lang.Object[] toArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||