org.hibernate.shards.util
Class Sets

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

public class Sets
extends Object

Helper methods related to Sets.

Author:
maxr@google.com (Max Ross)

Method Summary
static
<E> HashSet<E>
newHashSet()
          Construct a new HashSet, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> HashSet<E>
newHashSet(E... elements)
          Construct a new HashSet with the provided elements, taking advantage of type inference to avoid specifying the type on the rhs.
static
<E> HashSet<E>
newHashSet(Iterable<? extends E> elements)
          Construct a new HashSet with the contents of the provided Iterable, 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

newHashSet

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


newHashSet

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


newHashSet

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