public interface ITupleSet
Modifier and Type | Method and Description |
---|---|
void |
add(LogicTuple t)
Add a logic tuple to tuple set.
|
void |
beginTransaction()
Begins a transaction section
Every operation on multiset can be undone
|
void |
empty()
Removes all element from Tuple Set.
|
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()
Returns
true if the tuple set contains no elements. |
boolean |
operationsPending()
Tells whether there are changes in the tuple multi-set during a
transaction
|
LogicTuple |
readMatchingTuple(LogicTuple templ) |
void |
remove(LogicTuple t)
Remove a logic tuple from tuple set.
|
int |
size()
Returns the number of elements in this tuple set.
|
LogicTuple[] |
toArray() |
java.lang.String |
toString()
Provides a representation of the tuple multi-set in the form of a String
containing a prolog theory.
|
void add(LogicTuple t)
t
- a LogicTuple
to add.void beginTransaction()
void empty()
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
invocationjava.util.Iterator<LogicTuple> getIterator()
LogicTuple getMatchingTuple(LogicTuple templ)
templ
- the tuple template to use for unificationboolean isEmpty()
true
if the tuple set contains no elements.true
if the tuple set contains no elements.boolean operationsPending()
LogicTuple readMatchingTuple(LogicTuple templ)
templ
- the tuple template to use for unificationvoid remove(LogicTuple t)
t
- a LogicTuple
to remove.int size()
LogicTuple[] toArray()
java.lang.String toString()
toString
in class java.lang.Object