org.apache.directory.shared.ldap.util
Class EmptyEnumeration

java.lang.Object
  extended by org.apache.directory.shared.ldap.util.EmptyEnumeration
All Implemented Interfaces:
Enumeration, NamingEnumeration

public class EmptyEnumeration
extends Object
implements NamingEnumeration

An empty NamingEnumeration without any values: meaning hasMore/hasMoreElements() always returns false, and next/nextElement() always throws a NoSuchElementException.

Version:
$Revision: 434411 $
Author:
Apache Directory Project

Constructor Summary
EmptyEnumeration()
           
 
Method Summary
 void close()
           
 boolean hasMore()
          Always returns false.
 boolean hasMoreElements()
          Always return false.
 Object next()
          Always throws NoSuchElementException.
 Object 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
See Also:
NamingEnumeration.close()

hasMore

public boolean hasMore()
                throws NamingException
Always returns false.

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

next

public Object next()
            throws NamingException
Always throws NoSuchElementException.

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

hasMoreElements

public boolean hasMoreElements()
Always return false.

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

nextElement

public Object nextElement()
Always throws NoSuchElementException.

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


Copyright © 2004-2012. All Rights Reserved.