Class Sets (1.47.0)

public final class Sets

Static utility methods pertaining to Set instances.

NOTE: this is a copy of a subset of Guava's com.google.common.collect.Sets. The implementation must match as closely as possible to Guava's implementation.

Inheritance

java.lang.Object > Sets

Static Methods

newHashSet()

public static HashSet <E>newHashSet()

Returns a new mutable, empty HashSet instance.

Returns
Type Description
HashSet<E>

newTreeSet()

public static TreeSet <E>newTreeSet()

Returns a new mutable, empty TreeSet instance sorted by the natural sort ordering of its elements.

Returns
Type Description
TreeSet<E>