ptolemy.backtrack.util
Class FieldRecord.IndividualIterator

java.lang.Object
  extended by ptolemy.backtrack.util.FieldRecord.IndividualIterator
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
FieldRecord

public class FieldRecord.IndividualIterator
extends java.lang.Object
implements java.util.Iterator

Iterator of the records for the given dimension.

Since:
Ptolemy II 5.1
Version:
$Id: FieldRecord.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Feng
See Also:
FieldRecord.iterator(int)
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Field Summary
private  FieldRecord.RecordList _currentList
          The current record for that dimension.
private  int _index
          The index.
private  FieldRecord.RecordList _lastRecord
          The last record returned by next().
 
Constructor Summary
FieldRecord.IndividualIterator(int index)
          Construct an iterator for the given index of dimensions.
 
Method Summary
 boolean hasNext()
          Test if there are more elements.
 java.lang.Object next()
          Return the next element.
 void remove()
          Remove the last element returned by next().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_currentList

private FieldRecord.RecordList _currentList
The current record for that dimension.


_index

private int _index
The index.


_lastRecord

private FieldRecord.RecordList _lastRecord
The last record returned by next().

Constructor Detail

FieldRecord.IndividualIterator

FieldRecord.IndividualIterator(int index)
Construct an iterator for the given index of dimensions.

Parameters:
index - The index.
See Also:
FieldRecord.iterator(int)
Method Detail

hasNext

public boolean hasNext()
Test if there are more elements.

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there are more elements.

next

public java.lang.Object next()
Return the next element.

Specified by:
next in interface java.util.Iterator
Returns:
The next element.

remove

public void remove()
Remove the last element returned by next(). This function must be called after next().

Specified by:
remove in interface java.util.Iterator