com.atlassian.core.util.collection
Class EasyList

java.lang.Object
  extended by com.atlassian.core.util.collection.EasyList

Deprecated. use the appropriate methods on Guava's ImmutableList, Lists, or Iterables

@Deprecated
public class EasyList
extends Object

A replacement for UtilMisc.toList().

Most methods here are not null safe


Constructor Summary
EasyList()
          Deprecated.  
 
Method Summary
static
<T> List<T>
build()
          Deprecated.  
static
<A,B extends A>
List<A>
build(A o1, B o2)
          Deprecated.  
static
<A,B extends A,C extends A>
List<A>
build(A o1, B o2, C o3)
          Deprecated.  
static
<A,B extends A,C extends A,D extends A>
List<A>
build(A o1, B o2, C o3, D o4)
          Deprecated.  
static
<A,B extends A,C extends A,D extends A,E extends A>
List<A>
build(A o1, B o2, C o3, D o4, E... others)
          Deprecated.  
static
<T> List<T>
build(Collection<T> collection)
          Deprecated.  
static
<T> List<T>
build(T o1)
          Deprecated.  
static
<T> List<T>
build(T[] array)
          Deprecated.  
static
<T> List<T>
buildNonNull(Collection<T> c)
          Deprecated.  
static
<T> List<T>
buildNonNull(T o)
          Deprecated.  
static
<T> List<T>
buildNonNull(T[] array)
          Deprecated.  
static
<T> List<T>
buildNull()
          Deprecated. Creates a list with one null value.
static
<T> List<T>
createList(int size)
          Deprecated.  
static
<T,U extends T,V extends T>
List<T>
mergeLists(List<T> a, List<U> b, List<V> c)
          Deprecated. use Guava's Iterables.concat()
static
<T> List<List<T>>
shallowSplit(List<T> list, int sublength)
          Deprecated. use Guava's Lists.partition()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyList

public EasyList()
Deprecated. 
Method Detail

buildNull

public static <T> List<T> buildNull()
Deprecated. 
Creates a list with one null value. Occasionally useful.

Returns:
a list with one null value.

build

public static <T> List<T> build(T[] array)
Deprecated. 

buildNonNull

public static <T> List<T> buildNonNull(T[] array)
Deprecated. 

buildNonNull

public static <T> List<T> buildNonNull(Collection<T> c)
Deprecated. 

buildNonNull

public static <T> List<T> buildNonNull(T o)
Deprecated. 

build

public static <T> List<T> build()
Deprecated. 

build

public static <T> List<T> build(T o1)
Deprecated. 

build

public static <A,B extends A> List<A> build(A o1,
                                            B o2)
Deprecated. 

build

public static <A,B extends A,C extends A> List<A> build(A o1,
                                                        B o2,
                                                        C o3)
Deprecated. 

build

public static <A,B extends A,C extends A,D extends A> List<A> build(A o1,
                                                                    B o2,
                                                                    C o3,
                                                                    D o4)
Deprecated. 

build

public static <A,B extends A,C extends A,D extends A,E extends A> List<A> build(A o1,
                                                                                B o2,
                                                                                C o3,
                                                                                D o4,
                                                                                E... others)
Deprecated. 

build

public static <T> List<T> build(Collection<T> collection)
Deprecated. 

createList

public static <T> List<T> createList(int size)
Deprecated. 

mergeLists

public static <T,U extends T,V extends T> List<T> mergeLists(List<T> a,
                                                             List<U> b,
                                                             List<V> c)
Deprecated. use Guava's Iterables.concat()

Merge a maximum of three lists. Null lists passed in will be ignored.

Parameters:
a - The first list.
b - The second list.
c - The third list.
Returns:
A merged list containing the objects of all three passed in lists.

shallowSplit

public static <T> List<List<T>> shallowSplit(List<T> list,
                                             int sublength)
Deprecated. use Guava's Lists.partition()

Splits a list into a number of sublists of the correct length. Note this will create a 'shallow' split, in other words if you set/remove on the sublists, this will modify the parent list as well (same vice versa). Therefore, DO NOT publish the result of this method to clients as the you will be publishing read/write access to your underlying data and the results will be unpredictable, especially in a multi-threaded context.

Parameters:
list - The list to split
sublength - Length of the sublists
Returns:
A list of lists of the correct length


Copyright © 2015 Atlassian. All rights reserved.