Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

alice.tuplemedium
Interface TupleSet  view TupleSet download TupleSet.java

All Superinterfaces:
java.io.Serializable

public interface TupleSet
extends java.io.Serializable

Specifies the services which must be provided by the component inside the tuple centre virtual machine collecting and managing tuples as a multiset An important aspect of the component implementing this interface is the ability to execute transactions, that is execute sequence of operations that could be commited or asked to be undone.

Version:
1.0

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 t)
          Gets (and removes) non-deterministically a tuple of the multiset matching the template specified
 boolean hasMatchingTuple(TupleTemplate t)
          Checks if exists a tuple inside the tuple set matching the template
 boolean isEmpty()
          Tests if the multiset is empty
 Tuple readMatchingTuple(TupleTemplate t)
          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
 

Method Detail

add

public void add(Tuple t)
Adds a tuple to the multiset


sub

public void sub(Tuple t)
Removes a tuple to the multiset


size

public int size()
Gets the number of tuples inside the multiset


isEmpty

public boolean isEmpty()
Tests if the multiset is empty


empty

public void empty()
Empties the multiset


beginTransaction

public void beginTransaction()
Begins a transaction section Every operation on multiset can be undone


endTransaction

public void endTransaction(boolean commit)
Ends a transaction section specifying if operations must be committed or undone


getMatchingTuple

public Tuple getMatchingTuple(TupleTemplate t)
Gets (and removes) non-deterministically a tuple of the multiset matching the template specified


readMatchingTuple

public Tuple readMatchingTuple(TupleTemplate t)
Gets (wtihout removal) non-deterministically a tuple of the multiset matching the template specified


hasMatchingTuple

public boolean hasMatchingTuple(TupleTemplate t)
Checks if exists a tuple inside the tuple set matching the template


getIterator

public java.util.Iterator getIterator()
Gets an iterator to navigate through tuples of the multiset