com.togethersoft.openapi.util.enum
Class SequenceEnumeration


public class SequenceEnumeration
implements Enumeration

Handles two or three enumerations as one.

Author:
TogetherSoft
Since: Together 4.0

Field Summary
 private EnumerationmyCurrent
           
 private intmyCurrentIndex
           
 private EnumerationmyFirst
           
 private EnumerationmySecond
           
 private EnumerationmyThird
           

Constructor Summary
SequenceEnumeration(Enumeration first, Enumeration second)
          Creates new SequenceEnumeration from two given.
SequenceEnumeration(Enumeration first, Enumeration second, Enumeration third)
          Creates new SequenceEnumeration from three given.

Method Summary
 booleanhasMoreElements()
          Checks is there more elements in combination of enumerations after counter.
 ObjectnextElement()
          Returns next element from combination of enumerations.

Field Detail

myCurrent

private Enumeration myCurrent

myCurrentIndex

private int myCurrentIndex

myFirst

private Enumeration myFirst

mySecond

private Enumeration mySecond

myThird

private Enumeration myThird
Constructor Detail

SequenceEnumeration

public SequenceEnumeration(Enumeration first, Enumeration second)
Creates new SequenceEnumeration from two given.

SequenceEnumeration

public SequenceEnumeration(Enumeration first, Enumeration second, Enumeration third)
Creates new SequenceEnumeration from three given.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Checks is there more elements in combination of enumerations after counter.
Returns: true if there, false else.

nextElement

public Object nextElement()
Returns next element from combination of enumerations.
Returns: Next element from combination of enumerations as an Object.
Throws:
NoSuchElementException If there is no more elements in combination.

Association Links

to Class java.util.Enumeration

to Class java.util.Enumeration

to Class java.util.Enumeration

to Class java.util.Enumeration