org.assertj.core.util
Class Sets

java.lang.Object
  extended by org.assertj.core.util.Sets

public final class Sets
extends Object

Utility methods related to Sets.

Author:
alruiz

Method Summary
static
<T> HashSet<T>
newHashSet()
          Creates a mutable HashSet.
static
<T> HashSet<T>
newHashSet(Iterable<? extends T> elements)
          Creates a mutable HashSet containing the given elements.
static
<T> LinkedHashSet<T>
newLinkedHashSet()
          Creates a mutable LinkedHashSet.
static
<T> LinkedHashSet<T>
newLinkedHashSet(T... elements)
          Creates a mutable LinkedHashSet containing the given elements.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newHashSet

public static <T> HashSet<T> newHashSet()
Creates a mutable HashSet.

Type Parameters:
T - the generic type of the HashSet to create.
Returns:
the created HashSet.

newHashSet

public static <T> HashSet<T> newHashSet(Iterable<? extends T> elements)
Creates a mutable HashSet containing the given elements.

Type Parameters:
T - the generic type of the HashSet to create.
Parameters:
elements - the elements to store in the HashSet.
Returns:
the created HashSet, or null if the given array of elements is null.

newLinkedHashSet

public static <T> LinkedHashSet<T> newLinkedHashSet()
Creates a mutable LinkedHashSet.

Type Parameters:
T - the generic type of the LinkedHashSet to create.
Returns:
the created LinkedHashSet.

newLinkedHashSet

public static <T> LinkedHashSet<T> newLinkedHashSet(T... elements)
Creates a mutable LinkedHashSet containing the given elements.

Type Parameters:
T - the generic type of the LinkedHashSet to create.
Parameters:
elements - the elements to store in the LinkedHashSet.
Returns:
the created LinkedHashSet, or null if the given array of elements is null.


Copyright © 2013–2015 AssertJ. All rights reserved.