public class TupleSet
extends java.lang.Object
Constructor and Description |
---|
TupleSet() |
Modifier and Type | Method and Description |
---|---|
void |
add(LogicTuple t) |
void |
beginTransaction()
Begins a transaction section
Every operation on multiset can be undone
|
void |
empty() |
void |
endTransaction(boolean commit)
Ends a transaction section specifying if operations must be committed or
undone
|
java.util.Iterator<LogicTuple> |
getIterator() |
LogicTuple |
getMatchingTuple(LogicTuple templ) |
boolean |
isEmpty() |
boolean |
operationsPending()
Tells whether there are changes in the tuple multi-set during a
transaction
|
LogicTuple |
readMatchingTuple(LogicTuple templ) |
int |
size() |
LogicTuple[] |
toArray() |
java.lang.String |
toString()
Provides a representation of the tuple multi-set in the form of a String
containing a prolog theory.
|
public void add(LogicTuple t)
t
- the tuple to add to this tuple listpublic void beginTransaction()
public void empty()
public void endTransaction(boolean commit)
commit
- if true
the operations are committed, else they
are undone and the multiset is rolled back to the state before
the beginTransaction
invocationpublic java.util.Iterator<LogicTuple> getIterator()
public LogicTuple getMatchingTuple(LogicTuple templ)
templ
- the tuple template to be used to retrieve matching tuples from
this setpublic boolean isEmpty()
public boolean operationsPending()
public LogicTuple readMatchingTuple(LogicTuple templ)
templ
- the tuple template to be used to retrieve matching tuples from
this setpublic int size()
public LogicTuple[] toArray()
public java.lang.String toString()
toString
in class java.lang.Object