org.hibernate.shards.util
Class Lists

java.lang.Object
  extended by org.hibernate.shards.util.Lists

public class Lists
extends Object

Helper methods related to Lists.

Author:
maxr@google.com (Max Ross)

Method Summary
static
<E> ArrayList<E>
newArrayList()
          Construct a new ArrayList, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> ArrayList<E>
newArrayList(E... elements)
          Construct a new ArrayList with the provided elements, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> ArrayList<E>
newArrayList(Iterable<? extends E> elements)
          Construct a new ArrayList with the contents of the provided Iterable, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> ArrayList<E>
newArrayListWithCapacity(int initialCapacity)
          Construct a new ArrayList with the specified capacity, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> LinkedList<E>
newLinkedList()
          Construct a new LinkedList, taking advantage of type inference to avoid specifying the type on the rhs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newArrayList

public static <E> ArrayList<E> newArrayList()
Construct a new ArrayList, taking advantage of type inference to avoid specifying the type on the rhs.


newArrayListWithCapacity

public static <E> ArrayList<E> newArrayListWithCapacity(int initialCapacity)
Construct a new ArrayList with the specified capacity, taking advantage of type inference to avoid specifying the type on the rhs.


newArrayList

public static <E> ArrayList<E> newArrayList(E... elements)
Construct a new ArrayList with the provided elements, taking advantage of type inference to avoid specifying the type on the rhs.


newArrayList

public static <E> ArrayList<E> newArrayList(Iterable<? extends E> elements)
Construct a new ArrayList with the contents of the provided Iterable, taking advantage of type inference to avoid specifying the type on the rhs.


newLinkedList

public static <E> LinkedList<E> newLinkedList()
Construct a new LinkedList, taking advantage of type inference to avoid specifying the type on the rhs.