JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.util.formulae
Class TableExpressionListIterator

java.lang.Object
  |
  +--com.klg.jclass.util.formulae.TableExpressionListIterator
All Implemented Interfaces:
Iterator, ListIterator

public class TableExpressionListIterator
extends Object
implements Iterator, ListIterator

TableExpressionListIterator implements the ListIterator interface to allow iteration over the elements of a TableExpressionList.


Field Summary
protected  int currentPosition
          The current position in the list
protected  int endPosition
          The last position of the list
protected  int lastAccess
          The position in the list of the last element read by next() or previous()
protected  com.klg.jclass.util.formulae.TableExpressionList tableList
          The ExpressionList we're iterating over
 
Constructor Summary
TableExpressionListIterator(com.klg.jclass.util.formulae.TableExpressionList tel)
          Create an iterator over the given TableExpressionList
TableExpressionListIterator(com.klg.jclass.util.formulae.TableExpressionList tel, int firstIndex)
          Create an iterator over the given TableExpressionList, starting at the given initial position.
 
Method Summary
 void add(Object obj)
          Insert a new element into the list at the current position NOTE: add() is not supported on TableExpressionLists
 boolean hasNext()
          Determines if there is another element in the forward direction
 boolean hasPrevious()
          Determines if there is previous element in the List (backward)
 Object next()
          Get the next element in the List (forward direction)
 int nextIndex()
          Get the index of the element that would be returned if next() were called
 Object previous()
          Get the previous element in the List (backward direction)
 int previousIndex()
          Get the index of the element that would be returned if previous() were called
 void remove()
          Remove the last accessed element of the List NOTE: remove() is not supported on TableExpressionLists
 void set(Object obj)
          Replace the last accessed element of the List NOTE: set() is not supported on TableExpressionLists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tableList

protected com.klg.jclass.util.formulae.TableExpressionList tableList
The ExpressionList we're iterating over


currentPosition

protected int currentPosition
The current position in the list


endPosition

protected int endPosition
The last position of the list


lastAccess

protected int lastAccess
The position in the list of the last element read by next() or previous()

Constructor Detail

TableExpressionListIterator

public TableExpressionListIterator(com.klg.jclass.util.formulae.TableExpressionList tel)
Create an iterator over the given TableExpressionList

Parameters:
tel - The TableExpressionList to iterate over

TableExpressionListIterator

public TableExpressionListIterator(com.klg.jclass.util.formulae.TableExpressionList tel,
                                   int firstIndex)
Create an iterator over the given TableExpressionList, starting at the given initial position.

Parameters:
tel - The TableExpressionList to iterate over
Method Detail

hasNext

public boolean hasNext()
Determines if there is another element in the forward direction

Specified by:
hasNext in interface Iterator
Returns:
True if there is another (following) element in the List

hasPrevious

public boolean hasPrevious()
Determines if there is previous element in the List (backward)

Specified by:
hasPrevious in interface ListIterator
Returns:
True if there is a preceding element in the List

next

public Object next()
Get the next element in the List (forward direction)

Specified by:
next in interface Iterator
Returns:
The next element in the List

nextIndex

public int nextIndex()
Get the index of the element that would be returned if next() were called

Specified by:
nextIndex in interface ListIterator
Returns:
The index of the next element

previous

public Object previous()
Get the previous element in the List (backward direction)

Specified by:
previous in interface ListIterator
Returns:
The previous element in the List

previousIndex

public int previousIndex()
Get the index of the element that would be returned if previous() were called

Specified by:
previousIndex in interface ListIterator
Returns:
The index of the previous element

remove

public void remove()
Remove the last accessed element of the List NOTE: remove() is not supported on TableExpressionLists

Specified by:
remove in interface Iterator

set

public void set(Object obj)
Replace the last accessed element of the List NOTE: set() is not supported on TableExpressionLists

Specified by:
set in interface ListIterator
Parameters:
obj - The object to replace the last element with

add

public void add(Object obj)
Insert a new element into the list at the current position NOTE: add() is not supported on TableExpressionLists

Specified by:
add in interface ListIterator
Parameters:
obj - The object to insert into the List

Copyright © 2004 Quest Software Inc..
All rights reserved.