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

java.lang.Object
  extended byorg.apache.directory.shared.ldap.util.EmptyEnumeration
All Implemented Interfaces:
java.util.Enumeration, javax.naming.NamingEnumeration

public class EmptyEnumeration
extends java.lang.Object
implements javax.naming.NamingEnumeration

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

Version:
$Revision: 379008 $
Author:
Alex Karasulu, $Author: akarasulu $

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

hasMore

public boolean hasMore()
                throws javax.naming.NamingException
Always returns false.

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

next

public java.lang.Object next()
                      throws javax.naming.NamingException
Always throws NoSuchElementException.

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

hasMoreElements

public boolean hasMoreElements()
Always return false.

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

nextElement

public java.lang.Object nextElement()
Always throws NoSuchElementException.

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


Copyright © 2003-2006 . All Rights Reserved.