com.atlassian.confluence.util.collections
Class CollectionUtils

java.lang.Object
  extended by com.atlassian.confluence.util.collections.CollectionUtils

public final class CollectionUtils
extends java.lang.Object


Method Summary
static
<T> T[]
array(T... elements)
          Return an array of the given elements.
static
<T> java.util.List<T>
list(T... elements)
          Returns a List with the given elements.
static
<T> java.util.Set<T>
set(T... elements)
          Returns a Set with the given elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

set

public static <T> java.util.Set<T> set(T... elements)
Returns a Set with the given elements.
 List<String> hs = list("s1", "s2");
 

Returns:
Set, never returns null

list

public static <T> java.util.List<T> list(T... elements)
Returns a List with the given elements.

Returns:
List, never returns null

array

public static <T> T[] array(T... elements)
Return an array of the given elements.

Integer[] aryOfInts = array(1,2,3,4);



Copyright © 2003-2014 Atlassian. All Rights Reserved.