Package org.opensearch.common.collect
Class Set
java.lang.Object
org.opensearch.common.collect.Set
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Set<T>copyOf(Collection<? extends T> coll) Delegates to the Java10Set.copyOfmethod.static <T> Set<T>of()Delegates to the Java9Set.of()method.static <T> Set<T>of(T e1) Delegates to the Java9Set.of()method.static <T> Set<T>of(T... entries) Delegates to the Java9Set.of()method.static <T> Set<T>of(T e1, T e2) Delegates to the Java9Set.of()method.
-
Constructor Details
-
Set
public Set()
-
-
Method Details
-
of
Delegates to the Java9Set.of()method.- Type Parameters:
T- theSet's element type- Returns:
- an empty
Set
-
of
Delegates to the Java9Set.of()method.- Type Parameters:
T- theSet's element type- Parameters:
e1- the single element- Returns:
- a
Setcontaining the specified element
-
of
Delegates to the Java9Set.of()method.- Type Parameters:
T- theSet's element type- Parameters:
e1- the first elemente2- the second element- Returns:
- a
Setcontaining the specified element
-
of
Delegates to the Java9Set.of()method.- Type Parameters:
T- theSet's element type- Parameters:
entries- the elements to be contained in the set- Returns:
- an unmodifiable set containing the specified elements.
-
copyOf
Delegates to the Java10Set.copyOfmethod.- Type Parameters:
T- theSet's element type- Parameters:
coll- aCollectionfrom which elements are drawn, must be non-null- Returns:
- a
Setcontaining the elements of the givenCollection
-