ImmutableSet which is created by calling the Sets.immutable.empty() method.
| Modifier and Type | Field and Description |
|---|---|
| private static final PartitionImmutableSet | |
| pack-priv static final ImmutableSet | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | allSatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty. |
| public <P> boolean | allSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for every element of the collection, or returns false. |
| public boolean | anySatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the iterable. |
| public <P> boolean | anySatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to true for any element of the collection, or return false. |
| public void | appendString(Appendable appendable)
Overrides default org. Prints a string representation of this collection onto the given |
| public void | appendString(Appendable appendable, String separator)
Overrides org. Overrides default org. Prints a string representation of this collection onto the given |
| public void | appendString(Appendable appendable, String start, String separator, String end)
Overrides org. Implements org. Prints a string representation of this collection onto the given |
| public <V> ImmutableSet | collect(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public <V, R extends Collection | collect(Function<? super T, ? extends V> function, R target)
Overrides org. Implements org. Same as |
| public <V> ImmutableSet | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection, but only for those elements which return true upon evaluation of the predicate. |
| public <V, R extends Collection | collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target)
Overrides org. Implements org. Same as the collectIf method with two parameters but uses the specified target collection for the results. |
| public <P, V, R extends Collection | collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target)
Overrides org. Implements org. Same as collectWith but with a targetCollection parameter to gather the results. |
| public boolean | contains(Object obj)
Overrides org. Implements org. Returns |
| public int | count(Predicate<? super T> predicate)
Overrides org. Implements org. Return the total number of elements that answer true to the specified predicate. |
| public <V> ImmutableBag | countBy(Function<? super T, ? extends V> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, R extends MutableBagIterable | countBy(Function<? super T, ? extends V> function, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V> ImmutableBag | countByEach(Function<? super T, ? extends Iterable<V>> function)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, R extends MutableBagIterable | countByEach(Function<? super T, ? extends Iterable<V>> function, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection. |
| public <V, P> ImmutableBag | countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter)
Overrides org. Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public <V, P, R extends MutableBagIterable | countByWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target)
Overrides default org. This method will count the number of occurrences of each value calculated by applying the function to each element of the collection with the specified parameter as the second argument. |
| public <P> int | countWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns the total number of elements that evaluate to true for the specified predicate. |
| public T | detect(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true. |
| public T | detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
Overrides default org. Returns the first element of the iterable for which the predicate evaluates to true. |
| public Optional | detectOptional(Predicate<? super T> predicate)
Overrides org. Implements org. Returns the first element of the iterable for which the predicate evaluates to true as an Optional. |
| public void | each(Procedure<? super T> procedure)
Implements org. The procedure is executed for each element in the iterable. |
| public boolean | equals(Object other)
Overrides java. Implements org. Compares the specified object with this set for equality. |
| public <V> ImmutableSet | flatCollect(Function<? super T, ? extends Iterable<V>> function)
Overrides org. Implements org.
|
| public <V, R extends Collection | flatCollect(Function<? super T, ? extends Iterable<V>> function, R target)
Overrides org. Implements org. Same as flatCollect, only the results are collected into the target collection. |
| public <P> void | forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public T | getFirst()
Implements org. Returns the first element of an iterable. |
| public T | getLast()
Implements org. Returns the last element of an iterable. |
| public T | getOnly()
Overrides default org. Returns the element if the iterable has exactly one element. |
| public <V, R extends MutableMultimap | groupBy(Function<? super T, ? extends V> function, R target)
Overrides org. Implements org. Same as |
| public <V, R extends MutableMultimap | groupByEach(Function<? super T, ? extends Iterable<V>> function, R target)
Overrides org. Implements org. Same as |
| public int | hashCode()
Overrides java. Implements org. Returns the hash code value for this set. |
| public <IV> IV | injectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function)
Overrides org. Implements org. Returns the final result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public int | injectInto(int injectedValue, IntObjectToIntFunction<? super T> intObjectToIntFunction)
Overrides org. Implements org. Returns the final int result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public long | injectInto(long injectedValue, LongObjectToLongFunction<? super T> longObjectToLongFunction)
Overrides org. Implements org. Returns the final long result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public double | injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> doubleObjectToDoubleFunction)
Overrides org. Implements org. Returns the final double result of evaluating function using each element of the iterable and the previous evaluation result as the parameters. |
| public boolean | isEmpty()
Overrides org. Implements org. Returns |
| public Iterator | iterator()
Implements java. Returns an iterator over the elements in this set. |
| public String | makeString()
Overrides default org. Returns a string representation of this collection by delegating to |
| public String | makeString(String separator)
Overrides default org. Returns a string representation of this collection by delegating to |
| public String | makeString(String start, String separator, String end)
Overrides default org. Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings. |
| public T | max(Comparator<? super T> comparator)
Overrides org. Implements org. Returns the maximum element out of this container based on the comparator. |
| public T | max()
Overrides org. Implements org. Returns the maximum element out of this container based on the natural order. |
| public <V extends Comparable | maxBy(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns the maximum elements out of this container based on the natural order of the attribute returned by Function. |
| public T | min(Comparator<? super T> comparator)
Overrides org. Implements org. Returns the minimum element out of this container based on the comparator. |
| public T | min()
Overrides org. Implements org. Returns the minimum element out of this container based on the natural order. |
| public <V extends Comparable | minBy(Function<? super T, ? extends V> function)
Overrides org. Implements org. Returns the minimum elements out of this container based on the natural order of the attribute returned by Function. |
| public ImmutableSet | newWith(T element)
Overrides org. Implements org. This method is similar to the |
| public ImmutableSet | newWithAll(Iterable<? extends T> elements)
Overrides org. Implements org. This method is similar to the |
| public ImmutableSet | newWithout(T element)
Overrides org. Implements org. This method is similar to the |
| public ImmutableSet | newWithoutAll(Iterable<? extends T> elements)
Overrides org. Implements org. This method is similar to the |
| public boolean | noneSatisfy(Predicate<? super T> predicate)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty. |
| public <P> boolean | noneSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
Overrides org. Implements org. Returns true if the predicate evaluates to false for every element of the collection, or return false. |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public PartitionImmutableSet | partition(Predicate<? super T> predicate)
Overrides org. Implements org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public ImmutableSet | reject(Predicate<? super T> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <R extends Collection | reject(Predicate<? super T> predicate, R target)
Overrides org. Implements org. Same as the reject method with one parameter but uses the specified target collection for the results. |
| public <P, R extends Collection | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)
Overrides org. Implements org. Similar to |
| public ImmutableSet | select(Predicate<? super T> predicate)
Overrides org. Implements org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <R extends Collection | select(Predicate<? super T> predicate, R target)
Overrides org. Implements org. Same as the select method with one parameter but uses the specified target collection for the results. |
| public <P, R extends Collection | selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target)
Overrides org. Implements org. Similar to |
| public int | size()
Implements org. Returns the number of elements in this set (its cardinality). |
| public ImmutableSet | tap(Procedure<? super T> procedure)
Overrides org. Implements org. Executes the Procedure for each element in the iterable and returns |
| public String | toString()
Overrides org. Implements org. Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets. |
| private Object | |
| public <S> ImmutableSet | zip(Iterable<S> that)
Overrides org. Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zip(Iterable) instead.
Returns a |
| public <S, R extends Collection | zip(Iterable<S> that, R target)
Overrides org. Implements org. Same as |
| public ImmutableSet | zipWithIndex()
Overrides org. Implements org.
Deprecated
in 6.0. Use
OrderedIterable#zipWithIndex() instead.
Zips this |
| public <R extends Collection | zipWithIndex(R target)
Overrides org. Implements org. Same as |