Java TreeSet toTreeSet(Collection lines)

Here you can find the source of toTreeSet(Collection lines)

Description

to Tree Set

License

Open Source License

Declaration

public static TreeSet<String> toTreeSet(Collection<String> lines) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

import java.util.TreeSet;

public class Main {
    public static TreeSet<String> toTreeSet(Collection<String> lines) {
        TreeSet<String> tree = new TreeSet<String>();
        for (String em : lines) {
            tree.add(em);//from   w ww .j  a v  a 2s  .com
        }
        return tree;
    }
}

Related

  1. getTreeSet(final Object o, final Class classElement)
  2. getVariance(TreeSet positions)
  3. intersection(TreeSet AL1, TreeSet AL2)
  4. minDiff(TreeSet numbers)
  5. newTreeSet(final Collection c)
  6. toTreeSet(Collection collection, Comparator comparator)
  7. treeSet(E... add)
  8. treeSet(final Collection collection)
  9. treeSet(final T item)