org.displaytag.util
Class CollectionUtil

java.lang.Object
  extended byorg.displaytag.util.CollectionUtil

public final class CollectionUtil
extends java.lang.Object

Utility methods for collection handling.

Version:
$Revision: 1.9 $ ($Author: fgiust $)
Author:
Fabrizio Giustina

Method Summary
static java.util.List getListFromObject(java.lang.Object iterableObject, int startIndex, int numberOfItems)
          create an iterator on a given object (Collection, Enumeration, array, single Object) and crop the resulting list according to the startIndex and numberOfItems parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getListFromObject

public static java.util.List getListFromObject(java.lang.Object iterableObject,
                                               int startIndex,
                                               int numberOfItems)
create an iterator on a given object (Collection, Enumeration, array, single Object) and crop the resulting list according to the startIndex and numberOfItems parameters.

Parameters:
iterableObject - Collection, Enumeration or array to crop
startIndex - int starting index
numberOfItems - int number of items to keep in the list
Returns:
List with values taken from the given object, cropped according the startIndex and numberOfItems parameters


Copyright © 2002-2005 the Displaytag team. All Rights Reserved.