org.apache.directory.shared.ldap.util
Class EmptyEnumeration<T>

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

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

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

Version:
$Revision: 574314 $
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 javax.naming.NamingEnumeration<T>
See Also:
NamingEnumeration.close()

hasMore

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

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

next

public T next()
       throws javax.naming.NamingException
Always throws NoSuchElementException.

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

hasMoreElements

public boolean hasMoreElements()
Always return false.

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

nextElement

public T nextElement()
Always throws NoSuchElementException.

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


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.