Class FlatCollectDoubleToObjectIterable<V>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.lazy.AbstractLazyIterable<V>
-
- org.eclipse.collections.impl.lazy.primitive.FlatCollectDoubleToObjectIterable<V>
-
- All Implemented Interfaces:
java.lang.Iterable<V>
,InternalIterable<V>
,LazyIterable<V>
,RichIterable<V>
public class FlatCollectDoubleToObjectIterable<V> extends AbstractLazyIterable<V>
This file was automatically generated from template file flatCollectPrimitiveToObjectIterable.stg.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
FlatCollectDoubleToObjectIterable.FlatCollectDoubleIterator<V>
-
Field Summary
Fields Modifier and Type Field Description private DoubleToObjectFunction<? extends java.lang.Iterable<V>>
function
private DoubleIterable
iterable
-
Constructor Summary
Constructors Constructor Description FlatCollectDoubleToObjectIterable(DoubleIterable iterable, DoubleToObjectFunction<? extends java.lang.Iterable<V>> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(Predicate<? super V> predicate)
Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty.<P> boolean
allSatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Returns true if the predicate evaluates to true for every element of the collection, or returns false.boolean
anySatisfy(Predicate<? super V> predicate)
Returns true if the predicate evaluates to true for any element of the iterable.<P> boolean
anySatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Returns true if the predicate evaluates to true for any element of the collection, or return false.V
detect(Predicate<? super V> predicate)
Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true.java.util.Optional<V>
detectOptional(Predicate<? super V> predicate)
Returns the first element of the iterable for which the predicate evaluates to true as an Optional.void
each(Procedure<? super V> procedure)
The procedure is executed for each element in the iterable.<P> void
forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.void
forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.java.util.Iterator<V>
iterator()
boolean
noneSatisfy(Predicate<? super V> predicate)
Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty.<P> boolean
noneSatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Returns true if the predicate evaluates to false for every element of the collection, or return false.-
Methods inherited from class org.eclipse.collections.impl.lazy.AbstractLazyIterable
asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, concatenate, distinct, drop, dropWhile, flatCollect, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, into, isEmpty, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, partition, partitionWith, reject, rejectWith, select, selectInstancesOf, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, take, takeWhile, tap, toArray, toStack, zip, zipWithIndex
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
appendString, appendString, collect, collectIf, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countByEach, countWith, detectWith, detectWithIfNone, detectWithOptional, flatCollect, forEach, groupBy, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, max, max, maxBy, min, min, minBy, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach
-
Methods inherited from interface org.eclipse.collections.api.LazyIterable
flatCollectWith
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateBy, aggregateInPlaceBy, appendString, appendString, appendString, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detectIfNone, detectWith, detectWithIfNone, detectWithOptional, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, notEmpty, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectWith, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndex
-
-
-
-
Field Detail
-
iterable
private final DoubleIterable iterable
-
function
private final DoubleToObjectFunction<? extends java.lang.Iterable<V>> function
-
-
Constructor Detail
-
FlatCollectDoubleToObjectIterable
public FlatCollectDoubleToObjectIterable(DoubleIterable iterable, DoubleToObjectFunction<? extends java.lang.Iterable<V>> function)
-
-
Method Detail
-
each
public void each(Procedure<? super V> procedure)
Description copied from interface:RichIterable
The procedure is executed for each element in the iterable.Example using a Java 8 lambda expression:
people.each(person -> LOGGER.info(person.getName()));
Example using an anonymous inner class:
people.each(new Procedure<Person>() { public void value(Person person) { LOGGER.info(person.getName()); } });
This method is a variant ofInternalIterable.forEach(Procedure)
that has a signature conflict withIterable.forEach(java.util.function.Consumer)
.- See Also:
InternalIterable.forEach(Procedure)
,Iterable.forEach(java.util.function.Consumer)
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
Description copied from interface:InternalIterable
Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });
- Specified by:
forEachWithIndex
in interfaceInternalIterable<V>
- Overrides:
forEachWithIndex
in classAbstractRichIterable<V>
-
forEachWith
public <P> void forEachWith(Procedure2<? super V,? super P> procedure, P parameter)
Description copied from interface:InternalIterable
The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) -> { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } }, fred);
Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);
- Specified by:
forEachWith
in interfaceInternalIterable<V>
- Overrides:
forEachWith
in classAbstractRichIterable<V>
-
iterator
public java.util.Iterator<V> iterator()
-
detect
public V detect(Predicate<? super V> predicate)
Description copied from interface:RichIterable
Returns the first element of the iterable for which the predicate evaluates to true or null in the case where no element returns true. This method is commonly called find.Example using a Java 8 lambda expression:
Person person = people.detect(person -> person.getFirstName().equals("John") && person.getLastName().equals("Smith"));
Example using an anonymous inner class:
Person person = people.detect(new Predicate<Person>() { public boolean accept(Person person) { return person.getFirstName().equals("John") && person.getLastName().equals("Smith"); } });
- Specified by:
detect
in interfaceRichIterable<V>
- Overrides:
detect
in classAbstractRichIterable<V>
-
detectOptional
public java.util.Optional<V> detectOptional(Predicate<? super V> predicate)
Description copied from interface:RichIterable
Returns the first element of the iterable for which the predicate evaluates to true as an Optional. This method is commonly called find.Example using a Java 8 lambda expression:
Person person = people.detectOptional(person -> person.getFirstName().equals("John") && person.getLastName().equals("Smith"));
- Specified by:
detectOptional
in interfaceRichIterable<V>
- Overrides:
detectOptional
in classAbstractRichIterable<V>
-
anySatisfy
public boolean anySatisfy(Predicate<? super V> predicate)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to true for any element of the iterable. Returns false if the iterable is empty, or if no element returned true when evaluating the predicate.- Specified by:
anySatisfy
in interfaceRichIterable<V>
- Overrides:
anySatisfy
in classAbstractRichIterable<V>
-
anySatisfyWith
public <P> boolean anySatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to true for any element of the collection, or return false. Returns false if the collection is empty.- Specified by:
anySatisfyWith
in interfaceRichIterable<V>
- Overrides:
anySatisfyWith
in classAbstractRichIterable<V>
-
allSatisfy
public boolean allSatisfy(Predicate<? super V> predicate)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to true for every element of the iterable or if the iterable is empty. Otherwise, returns false.- Specified by:
allSatisfy
in interfaceRichIterable<V>
- Overrides:
allSatisfy
in classAbstractRichIterable<V>
-
allSatisfyWith
public <P> boolean allSatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to true for every element of the collection, or returns false.- Specified by:
allSatisfyWith
in interfaceRichIterable<V>
- Overrides:
allSatisfyWith
in classAbstractRichIterable<V>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super V> predicate)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to false for every element of the iterable or if the iterable is empty. Otherwise, returns false.- Specified by:
noneSatisfy
in interfaceRichIterable<V>
- Overrides:
noneSatisfy
in classAbstractRichIterable<V>
-
noneSatisfyWith
public <P> boolean noneSatisfyWith(Predicate2<? super V,? super P> predicate, P parameter)
Description copied from interface:RichIterable
Returns true if the predicate evaluates to false for every element of the collection, or return false. Returns true if the collection is empty.- Specified by:
noneSatisfyWith
in interfaceRichIterable<V>
- Overrides:
noneSatisfyWith
in classAbstractRichIterable<V>
-
-