org.apache.directory.server.core.partition.impl.btree.jdbm
Class DupsEnumeration

java.lang.Object
  extended by org.apache.directory.server.core.partition.impl.btree.jdbm.DupsEnumeration
All Implemented Interfaces:
java.util.Enumeration, javax.naming.NamingEnumeration

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

NamingEnumeration that enumerates over duplicate values nested into a value using a TreeSet.

Version:
$Rev: 442600 $
Author:
Apache Directory Project

Constructor Summary
DupsEnumeration(JdbmTable table, NoDupsEnumeration list)
          Creates a DupsEnumeration over a enumeration of Tuples holding TreeSets for values that have the same key.
 
Method Summary
 void close()
          Closes the underlying NamingEnumeration
 boolean hasMore()
           
 boolean hasMoreElements()
          Calls hasMore.
 java.lang.Object next()
          Returns the same Tuple every time but with different key/value pairs.
 java.lang.Object nextElement()
          Returns the same Tuple every time but with different key/value pairs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DupsEnumeration

public DupsEnumeration(JdbmTable table,
                       NoDupsEnumeration list)
                throws javax.naming.NamingException
Creates a DupsEnumeration over a enumeration of Tuples holding TreeSets for values that have the same key.

Parameters:
list - the underlying enumeration
Throws:
javax.naming.NamingException - if there is a problem
Method Detail

next

public java.lang.Object next()
                      throws javax.naming.NamingException
Returns the same Tuple every time but with different key/value pairs.

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

nextElement

public java.lang.Object nextElement()
Returns the same Tuple every time but with different key/value pairs.

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

hasMore

public boolean hasMore()
Specified by:
hasMore in interface javax.naming.NamingEnumeration
See Also:
NamingEnumeration.hasMore()

hasMoreElements

public boolean hasMoreElements()
Calls hasMore.

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

close

public void close()
Closes the underlying NamingEnumeration

Specified by:
close in interface javax.naming.NamingEnumeration
See Also:
NamingEnumeration.close()


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