Java TreeSet Create newTreeSet(V... values)

Here you can find the source of newTreeSet(V... values)

Description

new Tree Set

License

Apache License

Declaration

public static <V extends Comparable<V>> Set<V> newTreeSet(V... values) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static <V extends Comparable<V>> Set<V> newTreeSet(V... values) {
        Set<V> set = new TreeSet<V>();
        Collections.addAll(set, values);

        return set;
    }/*from  ww  w  .j av  a 2s . c  o m*/
}

Related

  1. newTreeSet(E... elements)