Android Utililty Methods Set Create

List of utility methods to do Set Create

Description

The list of methods to do Set Create are organized into topic(s).

Method

SetCreateHashSet(T[] array)
Create Hash Set
Set<T> set = new HashSet<T>();
for (T v : array) {
    set.add(v);
return set;
SetCreateSortedSet(T[] array)
Create Sorted Set
Set<T> set = new TreeSet<T>();
for (T v : array) {
    set.add(v);
return set;
HashSetasSet(E... es)
Return the hash set consisting of adding the specified argument to a newly constructed set.
HashSet<E> result = new HashSet<E>();
for (E e : es)
    result.add(e);
return result;