org.apache.directory.api.util
Class EmptyEnumeration<T>

java.lang.Object
  extended by org.apache.directory.api.util.EmptyEnumeration<T>
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
EmptyEnumeration()
           
 
Method Summary
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyEnumeration

public EmptyEnumeration()
Method Detail

close

public void close()
Specified by:
close in interface NamingEnumeration<T>
See Also:
NamingEnumeration.close()

hasMore

public boolean hasMore()
                throws NamingException
Always returns false.

Specified by:
hasMore in interface NamingEnumeration<T>
Throws:
NamingException
See Also:
NamingEnumeration.hasMore()

next

public T next()
       throws NamingException
Always throws NoSuchElementException.

Specified by:
next in interface NamingEnumeration<T>
Throws:
NamingException
See Also:
NamingEnumeration.next()

hasMoreElements

public boolean hasMoreElements()
Always return false.

Specified by:
hasMoreElements in interface Enumeration<T>
See Also:
Enumeration.hasMoreElements()

nextElement

public T nextElement()
Always throws NoSuchElementException.

Specified by:
nextElement in interface Enumeration<T>
See Also:
Enumeration.nextElement()


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.