Top Description Fields Constructors Methods
org.eclipse.collections.impl.lazy.primitive

public Class CollectLongToObjectIterable<V>

extends AbstractLazyIterable<V>
Class Inheritance
Imports
java.util.Iterator, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.block.function.primitive.LongToObjectFunction, org.eclipse.collections.api.block.procedure.Procedure, .Procedure2, org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure, .LongProcedure, org.eclipse.collections.api.iterator.LongIterator, org.eclipse.collections.impl.lazy.AbstractLazyIterable

This file was automatically generated from template file collectPrimitiveToObjectIterable.stg.

Field Summary

Modifier and TypeField and Description
private final LongToObjectFunction<? extends V>
private final LongIterable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
each(final Procedure<? super V> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

public <P> void
forEachWith(final Procedure2<? super V, ? super P> procedure, final P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWith.

Implements org.eclipse.collections.api.InternalIterable.forEachWith.

The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument.

public void
forEachWithIndex(final ObjectIntProcedure<? super V> objectIntProcedure)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWithIndex.

Implements org.eclipse.collections.api.InternalIterable.forEachWithIndex.

Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure.

public boolean
public Iterator<V>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public boolean
notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

public int
size()

Overrides org.eclipse.collections.impl.lazy.AbstractLazyIterable.size.

Implements org.eclipse.collections.api.RichIterable.size.

Returns the number of items in this iterable.

Inherited from org.eclipse.collections.impl.lazy.AbstractLazyIterable:
asLazychunkcollectcollectBooleancollectBytecollectCharcollectDoublecollectFloatcollectIfcollectIntcollectLongcollectShortcollectWithconcatenatedistinctdropdropWhileflatCollectgetFirstgetLastgetOnlygroupBygroupByEachgroupByUniqueKeyintomaxByOptionalmaxOptionalmaxOptionalminByOptionalminOptionalminOptionalpartitionpartitionWithrejectrejectWithselectselectInstancesOfselectWithsumByDoublesumByFloatsumByIntsumByLongtaketakeWhiletaptoStackzipzipWithIndex

Field Detail

functionback to summary
private final LongToObjectFunction<? extends V> function
iterableback to summary
private final LongIterable iterable

Constructor Detail

CollectLongToObjectIterableback to summary
public CollectLongToObjectIterable(LongIterable iterable, LongToObjectFunction<? extends V> function)

Method Detail

eachback to summary
public void each(final Procedure<? super V> procedure)

Implements org.eclipse.collections.api.RichIterable.each.

Doc from org.eclipse.collections.api.RichIterable.each.

The procedure is executed for each element in the iterable.

Example using a Java 8 lambda expression:

people.each(person -> LOGGER.info(person.getName()));
This method is a variant of InternalIterable#forEach(Procedure) that has a signature conflict with Iterable#forEach(java.util.function.Consumer).
Annotations
@Override
forEachWithback to summary
public <P> void forEachWith(final Procedure2<? super V, ? super P> procedure, final P parameter)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWith.

Implements org.eclipse.collections.api.InternalIterable.forEachWith.

Doc from org.eclipse.collections.api.InternalIterable.forEachWith.

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);
Annotations
@Override
forEachWithIndexback to summary
public void forEachWithIndex(final ObjectIntProcedure<? super V> objectIntProcedure)

Overrides org.eclipse.collections.impl.AbstractRichIterable.forEachWithIndex.

Implements org.eclipse.collections.api.InternalIterable.forEachWithIndex.

Doc from org.eclipse.collections.api.InternalIterable.forEachWithIndex.

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());
    }
});
Annotations
@Override
isEmptyback to summary
public boolean isEmpty()

Overrides org.eclipse.collections.impl.lazy.AbstractLazyIterable.isEmpty.

Implements org.eclipse.collections.api.RichIterable.isEmpty.

Doc from org.eclipse.collections.api.RichIterable.isEmpty.

Returns true if this iterable has zero items.

Annotations
@Override
iteratorback to summary
public Iterator<V> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Annotations
@Override
notEmptyback to summary
public boolean notEmpty()

Overrides default org.eclipse.collections.api.RichIterable.notEmpty.

Doc from org.eclipse.collections.api.RichIterable.notEmpty.

The English equivalent of !this.isEmpty()

Annotations
@Override
sizeback to summary
public int size()

Overrides org.eclipse.collections.impl.lazy.AbstractLazyIterable.size.

Implements org.eclipse.collections.api.RichIterable.size.

Doc from org.eclipse.collections.api.RichIterable.size.

Returns the number of items in this iterable.

Annotations
@Override