com.togethersoft.openapi.util.enum
Class SingleEnumeration


public class SingleEnumeration
implements Enumeration

Presents enumeration contains only one element as an Object.

Author:
TogetherSoft

Constructor Summary
SingleEnumeration(Object value)
           Creates new single enumeration from specified Object.

Method Summary
 booleanhasMoreElements()
           Checks is there more elements in enumeration.
 ObjectnextElement()
           Returns the only element from enumaration.

Constructor Detail

SingleEnumeration

public SingleEnumeration(Object value)
Creates new single enumeration from specified Object.
Method Detail

hasMoreElements

public boolean hasMoreElements()
Checks is there more elements in enumeration.
Returns: true if there is ("nextElement" method passed at least ones), false else.

nextElement

public Object nextElement()
Returns the only element from enumaration.
Returns: Element as an Object.