Java TreeSet getTreeSet(Collection collection)

Here you can find the source of getTreeSet(Collection collection)

Description

get Tree Set

License

Open Source License

Declaration

public static <E> Set<E> getTreeSet(Collection<? extends E> collection) 

Method Source Code

//package com.java2s;

import java.util.Collection;

import java.util.Comparator;

import java.util.Set;

import java.util.SortedSet;

import java.util.TreeSet;

public class Main {

    public static <E> Set<E> getTreeSet() {
        return new TreeSet<E>();
    }/*from  w w  w  .  j  ava 2s .  c  om*/

    public static <E> Set<E> getTreeSet(Collection<? extends E> collection) {
        return new TreeSet<E>(collection);
    }

    public static <E> Set<E> getTreeSet(Comparator<? super E> comparator) {
        return new TreeSet<E>(comparator);
    }

    public static <E> Set<E> getTreeSet(SortedSet<E> set) {
        return new TreeSet<E>(set);
    }
}

Related

  1. convertSpanToSparseGrid(final int curIx, final int span, final TreeSet indexes)
  2. createTreeSet(Iterable c)
  3. cvtListToTreeSet(List list)
  4. findSizedSubdirs(final String size, final TreeSet themeSubdirs)
  5. getDockInsets(final TreeSet set)
  6. getTreeSet(final Object o, final Class classElement)
  7. getVariance(TreeSet positions)
  8. intersection(TreeSet AL1, TreeSet AL2)
  9. minDiff(TreeSet numbers)