Package org.apache.directory.api.util
Class EmptyEnumeration<T>
- java.lang.Object
-
- org.apache.directory.api.util.EmptyEnumeration<T>
-
- Type Parameters:
T- The element in the enumeration
- All Implemented Interfaces:
Enumeration<T>,NamingEnumeration<T>
public class EmptyEnumeration<T> extends Object implements NamingEnumeration<T>
An empty NamingEnumeration without any values: meaning hasMore/hasMoreElements() always returns false, and next/nextElement() always throws a NoSuchElementException.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description EmptyEnumeration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasMore()Always returns false.booleanhasMoreElements()Always return false.Tnext()Always throws NoSuchElementException.TnextElement()Always throws NoSuchElementException.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
Method Detail
-
close
public void close()
- Specified by:
closein interfaceNamingEnumeration<T>- See Also:
NamingEnumeration.close()
-
hasMore
public boolean hasMore() throws NamingExceptionAlways returns false.- Specified by:
hasMorein interfaceNamingEnumeration<T>- Throws:
NamingException- See Also:
NamingEnumeration.hasMore()
-
next
public T next() throws NamingException
Always throws NoSuchElementException.- Specified by:
nextin interfaceNamingEnumeration<T>- Throws:
NamingException- See Also:
NamingEnumeration.next()
-
hasMoreElements
public boolean hasMoreElements()
Always return false.- Specified by:
hasMoreElementsin interfaceEnumeration<T>- See Also:
Enumeration.hasMoreElements()
-
nextElement
public T nextElement()
Always throws NoSuchElementException.- Specified by:
nextElementin interfaceEnumeration<T>- See Also:
Enumeration.nextElement()
-
-