Android Set Create CreateSortedSet(T[] array)

Here you can find the source of CreateSortedSet(T[] array)

Description

Create Sorted Set

Declaration

public static <T> Set<T> CreateSortedSet(T[] array) 

Method Source Code

//package com.java2s;

import java.util.Set;

import java.util.TreeSet;

public class Main {
    public static <T> Set<T> CreateSortedSet(T[] array) {
        Set<T> set = new TreeSet<T>();
        for (T v : array) {
            set.add(v);//w w w  .  j  a  v  a 2 s .  co m
        }
        return set;
    }
}

Related

  1. CreateHashSet(T[] array)
  2. asSet(E... es)