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 void
close()
boolean
hasMore()
Always returns false.boolean
hasMoreElements()
Always return false.T
next()
Always throws NoSuchElementException.T
nextElement()
Always throws NoSuchElementException.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Enumeration
asIterator
-
-
-
-
Constructor Detail
-
EmptyEnumeration
public EmptyEnumeration()
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceNamingEnumeration<T>
- See Also:
NamingEnumeration.close()
-
hasMore
public boolean hasMore() throws NamingException
Always returns false.- Specified by:
hasMore
in interfaceNamingEnumeration<T>
- Throws:
NamingException
- See Also:
NamingEnumeration.hasMore()
-
next
public T next() throws NamingException
Always throws NoSuchElementException.- Specified by:
next
in interfaceNamingEnumeration<T>
- Throws:
NamingException
- See Also:
NamingEnumeration.next()
-
hasMoreElements
public boolean hasMoreElements()
Always return false.- Specified by:
hasMoreElements
in interfaceEnumeration<T>
- See Also:
Enumeration.hasMoreElements()
-
nextElement
public T nextElement()
Always throws NoSuchElementException.- Specified by:
nextElement
in interfaceEnumeration<T>
- See Also:
Enumeration.nextElement()
-
-