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 $

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
 

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.