Project Wonder 5.0

er.extensions.foundation
Class ERXRoundRobinCollection<E>

java.lang.Object
  extended by er.extensions.foundation.ERXRoundRobinCollection<E>
Type Parameters:
E -

public class ERXRoundRobinCollection<E>
extends java.lang.Object

A simple thread-safe class that returns the next item in a list in round robin fashion. If only one item in the collection, the juggling is bypassed and that same item is returned every time.

Author:
kieran

Constructor Summary
ERXRoundRobinCollection(com.webobjects.foundation.NSArray<E> collection)
           
 
Method Summary
 com.webobjects.foundation.NSArray<E> array()
           
 E next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXRoundRobinCollection

public ERXRoundRobinCollection(com.webobjects.foundation.NSArray<E> collection)
Method Detail

array

public com.webobjects.foundation.NSArray<E> array()
Returns:
the array of objects in the pool

next

public E next()
Returns:
the next item in the pool infinitely. When end of the list is reached, the first item in the list is returned.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.