de.uni_paderborn.fujaba.codegen
Class OOGenTokenIterator

java.lang.Object
  extended byde.uni_paderborn.fujaba.codegen.OOGenTokenIterator
All Implemented Interfaces:
java.util.Enumeration

public class OOGenTokenIterator
extends java.lang.Object
implements java.util.Enumeration

A OOGenTokenIterator is a Enumeration that is also able to traverse a token list backwards. Use the prevElement() method to do so.

Version:
$Revision: 1.9 $
Author:
$Author: schneider $

Field Summary
private  OOGenToken current
          No comment provided by developer, please add a comment to improve documentation.
private  boolean done
          No comment provided by developer, please add a comment to improve documentation.
private  OOGenToken stopAfter
          No comment provided by developer, please add a comment to improve documentation.
 
Constructor Summary
OOGenTokenIterator(OOGenToken current)
          Creates a new iterator starting with the specified token
OOGenTokenIterator(OOGenToken current, OOGenToken stopAfter)
          Constructor for class OOGenTokenIterator
 
Method Summary
 java.lang.Object get()
          Returns the current element of this enumeration.
 boolean hasMoreElements()
          Tests if this Enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the current element of this enumeration and moves the current pointer to the next element.
 java.lang.Object prevElement()
          Returns the current element of this enumeration and moves the current pointer to the previous element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

current

private transient OOGenToken current
No comment provided by developer, please add a comment to improve documentation.


stopAfter

private transient OOGenToken stopAfter
No comment provided by developer, please add a comment to improve documentation.


done

private boolean done
No comment provided by developer, please add a comment to improve documentation.

Constructor Detail

OOGenTokenIterator

public OOGenTokenIterator(OOGenToken current)
Creates a new iterator starting with the specified token

Parameters:
current - the token where the iterator starts

OOGenTokenIterator

public OOGenTokenIterator(OOGenToken current,
                          OOGenToken stopAfter)
Constructor for class OOGenTokenIterator

Parameters:
current - No description provided
stopAfter - No description provided
Method Detail

hasMoreElements

public boolean hasMoreElements()
Tests if this Enumeration contains more elements.

Specified by:
hasMoreElements in interface java.util.Enumeration
Returns:
true if this enumeration contains more elements; false otherwise.

nextElement

public java.lang.Object nextElement()
Returns the current element of this enumeration and moves the current pointer to the next element.

Specified by:
nextElement in interface java.util.Enumeration
Returns:
the current element of this enumeration.

prevElement

public java.lang.Object prevElement()
Returns the current element of this enumeration and moves the current pointer to the previous element.

Returns:
the current element of this enumeration.

get

public java.lang.Object get()
Returns the current element of this enumeration.

Returns:
the current element of this enumeration.