com.atlassian.crowd.directory
Class LimitedNamingEnumeration<T>

java.lang.Object
  extended by com.atlassian.crowd.directory.LimitedNamingEnumeration<T>
All Implemented Interfaces:
Enumeration<T>, NamingEnumeration<T>

public class LimitedNamingEnumeration<T>
extends Object
implements NamingEnumeration<T>

Wrap a NamingEnumeration and only return up to a limited number of elements.


Constructor Summary
LimitedNamingEnumeration(NamingEnumeration<T> ne, int limit)
           
 
Method Summary
 void close()
           
 int getLimit()
           
 boolean hasMore()
           
 boolean hasMoreElements()
           
 T next()
           
 T nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LimitedNamingEnumeration

public LimitedNamingEnumeration(NamingEnumeration<T> ne,
                                int limit)
Method Detail

getLimit

public int getLimit()

close

public void close()
           throws NamingException
Specified by:
close in interface NamingEnumeration<T>
Throws:
NamingException

hasMore

public boolean hasMore()
                throws NamingException
Specified by:
hasMore in interface NamingEnumeration<T>
Throws:
NamingException

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<T>

next

public T next()
       throws NamingException
Specified by:
next in interface NamingEnumeration<T>
Throws:
NamingException

nextElement

public T nextElement()
Specified by:
nextElement in interface Enumeration<T>


Copyright © 2014 Atlassian. All Rights Reserved.