All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class macondo.mistero.collections.ReadIterator

macondo.mistero.collections.ReadIterator

public class ReadIterator
implements TupleIterator
A ReadIterator is an iterator that reads a sequence of tuples in a collection. If the collection is empty or all tuples have been read this iterator blocks, waiting for the insertion of other tuples.


Constructor Index

 o ReadIterator(Space, Tuple)
Builds a new ReadIterator on the given space to read tuples with the given pattern.

Method Index

 o nextTuple()
TupleIterator interface method.

Constructors

 o ReadIterator
 public ReadIterator(Space space,
                     Tuple pattern)
Builds a new ReadIterator on the given space to read tuples with the given pattern.

Parameters:
space - the tuple space where collected tuples reside.
pattern - the template of collected tuples.

Methods

 o nextTuple
 public Tuple nextTuple()
TupleIterator interface method. Returns the next tuple in this iteration. If no tuple is available blocks waiting for a corresponding insertion.

Returns:
the next tuple in this iteration.

All Packages  Class Hierarchy  This Package  Previous  Next  Index