org.milyn.util
Class CollectionsUtil

java.lang.Object
  extended by org.milyn.util.CollectionsUtil

public class CollectionsUtil
extends Object

Collections Utilities.

Author:
tom.fennelly@jboss.com

Method Summary
static
<T> List<T>
toList(Enumeration<T> objects)
          Create an Object List from the supplied Enumeration of objects.
static
<T> List<T>
toList(T... objects)
          Create an Object List from the supplied objects.
static
<T> Set<T>
toSet(T... objects)
          Create an Object Set from the supplied objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toSet

public static <T> Set<T> toSet(T... objects)
Create an Object Set from the supplied objects.

Parameters:
objects - The objects to be added to the set.
Returns:
The Set.

toList

public static <T> List<T> toList(T... objects)
Create an Object List from the supplied objects.

Parameters:
objects - The objects to be added to the list.
Returns:
The List.

toList

public static <T> List<T> toList(Enumeration<T> objects)
Create an Object List from the supplied Enumeration of objects.

Parameters:
objects - The objects to be added to the list.
Returns:
The List.


Copyright © 2018. All rights reserved.