com.togethersoft.openapi.util.enum
Class SequenceEnumeration


public class SequenceEnumeration
implements Enumeration

Handles two or three enumerations as one.

Author:
TogetherSoft

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.

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.