Java com.google.common.collect Sets fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.collect Sets fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.collect Sets.

The text is from its open source code.

Method

Set>cartesianProduct(List> sets)
Returns every possible list that can be formed by choosing one element from each of the given sets in order; the "n-ary Cartesian product" of the sets.
Set>cartesianProduct(Set... sets)
Returns every possible list that can be formed by choosing one element from each of the given sets in order; the "n-ary Cartesian product" of the sets.
EnumSetcomplementOf(Collection collection)
Creates an EnumSet consisting of all enum values that are not in the specified collection.
EnumSetcomplementOf(Collection collection, Class type)
Creates an EnumSet consisting of all enum values that are not in the specified collection.
SetViewdifference(final Set set1, final Set set2)
Returns an unmodifiable view of the difference of two sets.
Setfilter(Set unfiltered, Predicate predicate)
Returns the elements of unfiltered that satisfy a predicate.
SortedSetfilter(SortedSet unfiltered, Predicate predicate)
Returns the elements of a SortedSet , unfiltered , that satisfy a predicate.
NavigableSetfilter(NavigableSet unfiltered, Predicate predicate)
Returns the elements of a NavigableSet , unfiltered , that satisfy a predicate.
ImmutableSetimmutableEnumSet(Iterable elements)
Returns an immutable set instance containing the given enum elements.
ImmutableSetimmutableEnumSet(E anElement, E... otherElements)
Returns an immutable set instance containing the given enum elements.
SetViewintersection(final Set set1, final Set set2)
Returns an unmodifiable view of the intersection of two sets.
SetnewConcurrentHashSet()
Creates a thread-safe set backed by a hash map.
SetnewConcurrentHashSet(Iterable elements)
Creates a thread-safe set backed by a hash map and containing the given elements.
CopyOnWriteArraySetnewCopyOnWriteArraySet(Iterable elements)
Creates a CopyOnWriteArraySet instance containing the given elements.
CopyOnWriteArraySetnewCopyOnWriteArraySet()
Creates an empty CopyOnWriteArraySet instance.
EnumSetnewEnumSet(Iterable iterable, Class elementType)
Returns a new, mutable EnumSet instance containing the given elements in their natural order.
HashSetnewHashSet()
Creates a mutable, initially empty HashSet instance.
HashSetnewHashSet(E... elements)
Creates a mutable HashSet instance initially containing the given elements.
HashSetnewHashSet(Iterable elements)
Creates a mutable HashSet instance containing the given elements.
HashSetnewHashSet(Iterator elements)
Creates a mutable HashSet instance containing the given elements.
HashSetnewHashSetWithExpectedSize(int expectedSize)
Creates a HashSet instance, with a high enough initial table size that it should hold expectedSize elements without resizing.
SetnewIdentityHashSet()
Creates an empty Set that uses identity to determine equality.
LinkedHashSetnewLinkedHashSet()
Creates a mutable, empty LinkedHashSet instance.
LinkedHashSetnewLinkedHashSet(Iterable elements)
Creates a mutable LinkedHashSet instance containing the given elements in order.
LinkedHashSetnewLinkedHashSetWithExpectedSize(int expectedSize)
Creates a LinkedHashSet instance, with a high enough "initial capacity" that it should hold expectedSize elements without growth.
SetnewSetFromMap(Map map)
Returns a set backed by the specified map.
TreeSetnewTreeSet(Iterable elements)
Creates a mutable TreeSet instance containing the given elements sorted by their natural ordering.
TreeSetnewTreeSet(Comparator comparator)
Creates a mutable, empty TreeSet instance with the given comparator.
TreeSetnewTreeSet()
Creates a mutable, empty TreeSet instance sorted by the natural sort ordering of its elements.
Set>powerSet(Set set)
Returns the set of all possible subsets of set .
SetViewsymmetricDifference(final Set set1, final Set set2)
Returns an unmodifiable view of the symmetric difference of two sets.
NavigableSetsynchronizedNavigableSet(NavigableSet navigableSet)
Returns a synchronized (thread-safe) navigable set backed by the specified navigable set.
SetViewunion(final Set set1, final Set set2)
Returns an unmodifiable view of the union of two sets.