T
- The element in the enumerationpublic class SingletonEnumeration<T> extends Object implements NamingEnumeration<T>
Constructor and Description |
---|
SingletonEnumeration(T element)
Creates a NamingEnumeration over a single element.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Makes calls to hasMore to false even if we had more.
|
boolean |
hasMore() |
boolean |
hasMoreElements() |
T |
next() |
T |
nextElement() |
public SingletonEnumeration(T element)
element
- The element to store in this enumerationpublic void close()
close
in interface NamingEnumeration<T>
NamingEnumeration.close()
public boolean hasMore()
hasMore
in interface NamingEnumeration<T>
NamingEnumeration.hasMore()
public T next()
next
in interface NamingEnumeration<T>
NamingEnumeration.next()
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<T>
Enumeration.hasMoreElements()
public T nextElement()
nextElement
in interface Enumeration<T>
Enumeration.nextElement()
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.