| Modifier and Type | Method and Description |
|---|---|
| public ParallelSetIterable | asParallel(ExecutorService executorService, int batchSize)
Returns a parallel iterable of this SetIterable. |
| public <B> LazyIterable | cartesianProduct(SetIterable<B> set)
Returns the set whose members are all possible ordered pairs (a, b) where a is a member of |
| public SetIterable | difference(SetIterable<? extends T> subtrahendSet)
Returns the set of all members of |
| public <R extends Set | differenceInto(SetIterable<? extends T> subtrahendSet, R targetSet)
Same as |
| public boolean | |
| public int | |
| public SetIterable | intersect(SetIterable<? extends T> set)
Returns the set of all objects that are members of both |
| public <R extends Set | intersectInto(SetIterable<? extends T> set, R targetSet)
Same as |
| public boolean | isProperSubsetOf(SetIterable<? extends T> candidateSuperset)
Returns true if all the members of |
| public boolean | isSubsetOf(SetIterable<? extends T> candidateSuperset)
Returns true if all the members of |
| public PartitionSet | partition(Predicate<? super T> predicate)
Redeclares org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. |
| public <P> PartitionSet | partitionWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Filters a collection into a PartitionIterable based on the evaluation of the predicate. |
| public SetIterable | reject(Predicate<? super T> predicate)
Redeclares org. Returns all elements of the source collection that return false when evaluating of the predicate. |
| public <P> SetIterable | rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public SetIterable | select(Predicate<? super T> predicate)
Redeclares org. Returns all elements of the source collection that return true when evaluating the predicate. |
| public <S> SetIterable | selectInstancesOf(Class<S> clazz)
Redeclares org. Returns all elements of the source collection that are instances of the Class |
| public <P> SetIterable | selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Similar to |
| public SetIterable | symmetricDifference(SetIterable<? extends T> setB)
Returns the set of all objects that are a member of exactly one of |
| public <R extends Set | symmetricDifferenceInto(SetIterable<? extends T> set, R targetSet)
Same as |
| public SetIterable | tap(Procedure<? super T> procedure)
Redeclares org. Executes the Procedure for each element in the iterable and returns |
| public ImmutableSetIterable | |
| public SetIterable | union(SetIterable<? extends T> set)
Returns the set of all objects that are a member of |
| public <R extends Set | unionInto(SetIterable<? extends T> set, R targetSet)
Same as |
| public SetIterable | zipWithIndex()
Redeclares org.
Deprecated
in 6.0. Use
OrderedIterable#zipWithIndex() instead.
Zips this |
| asParallel | back to summary |
|---|---|
| public ParallelSetIterable Returns a parallel iterable of this SetIterable.
| |
| cartesianProduct | back to summary |
|---|---|
| public <B> LazyIterable Returns the set whose members are all possible ordered pairs (a, b) where a is a member of | |
| difference | back to summary |
|---|---|
| public SetIterable Returns the set of all members of | |
| differenceInto | back to summary |
|---|---|
| public <R extends Set Same as | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Follows the same general contract as
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Follows the same general contract as
| |
| intersect | back to summary |
|---|---|
| public SetIterable Returns the set of all objects that are members of both Note If you need to ensure that the memory references from | |
| intersectInto | back to summary |
|---|---|
| public <R extends Set Same as | |
| isProperSubsetOf | back to summary |
|---|---|
| public boolean isProperSubsetOf(SetIterable<? extends T> candidateSuperset) Returns true if all the members of | |
| isSubsetOf | back to summary |
|---|---|
| public boolean isSubsetOf(SetIterable<? extends T> candidateSuperset) Returns true if all the members of | |
| partition | back to summary |
|---|---|
| public PartitionSet Redeclares org. Doc from org. Filters a collection into a PartitionedIterable based on the evaluation of the predicate. Example using a Java 8 lambda expression:
PartitionIterable<Person> newYorkersAndNonNewYorkers =
people.partition(person -> person.getAddress().getState().getName().equals("New York"));
| |
| partitionWith | back to summary |
|---|---|
| public <P> PartitionSet Redeclares org. Doc from org. Filters a collection into a PartitionIterable based on the evaluation of the predicate. Example using a Java 8 lambda expression:
PartitionIterable<Person> newYorkersAndNonNewYorkers =
people.partitionWith((Person person, String state) -> person.getAddress().getState().getName().equals(state), "New York");
| |
| reject | back to summary |
|---|---|
| public SetIterable Redeclares org. Doc from org. Returns all elements of the source collection that return false when evaluating of the predicate. This method is also sometimes called filterNot and is the equivalent of calling iterable.select(Predicates.not(predicate)). Example using a Java 8 lambda expression:
RichIterable<Person> rejected =
people.reject(person -> person.person.getLastName().equals("Smith"));
| |
| rejectWith | back to summary |
|---|---|
| public <P> SetIterable Redeclares org. Doc from org. Similar to
E.g. return a Example using a Java 8 lambda expression:
RichIterable<Person> rejected =
people.rejectWith((Person person, Integer age) -> person.getAge() < age, Integer.valueOf(18));
| |
| select | back to summary |
|---|---|
| public SetIterable Redeclares org. Doc from org. Returns all elements of the source collection that return true when evaluating the predicate. This method is also commonly called filter. Example using a Java 8 lambda expression:
RichIterable<Person> selected =
people.select(person -> person.getAddress().getCity().equals("London"));
| |
| selectInstancesOf | back to summary |
|---|---|
| public <S> SetIterable Redeclares org. Doc from org. Returns all elements of the source collection that are instances of the Class
RichIterable<Integer> integers =
List.mutable.with(new Integer(0), new Long(0L), new Double(0.0)).selectInstancesOf(Integer.class);
| |
| selectWith | back to summary |
|---|---|
| public <P> SetIterable Redeclares org. Doc from org. Similar to
E.g. return a Example using a Java 8 lambda expression:
RichIterable<Person> selected =
people.selectWith((Person person, Integer age) -> person.getAge()>= age, Integer.valueOf(18));
| |
| symmetricDifference | back to summary |
|---|---|
| public SetIterable Returns the set of all objects that are a member of exactly one of | |
| symmetricDifferenceInto | back to summary |
|---|---|
| public <R extends Set Same as | |
| tap | back to summary |
|---|---|
| public SetIterable Redeclares org. Doc from org. Executes the Procedure for each element in the iterable and returns Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
| |
| toImmutable | back to summary |
|---|---|
| public ImmutableSetIterable | |
| union | back to summary |
|---|---|
| public SetIterable Returns the set of all objects that are a member of | |
| unionInto | back to summary |
|---|---|
| public <R extends Set Same as | |
| zipWithIndex | back to summary |
|---|---|
| public SetIterable Redeclares org. Doc from org. Deprecated in 6.0. Use Zips this
| |