@Immutable public class ReverseIterable<T> extends AbstractLazyIterable<T>
| Constructor and Description |
|---|
ReverseIterable(com.gs.collections.api.list.ListIterable<T> newAdapted) |
| Modifier and Type | Method and Description |
|---|---|
static <T> ReverseIterable<T> |
adapt(com.gs.collections.api.list.ListIterable<T> listIterable) |
void |
forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
The procedure is executed for each element in the iterable.
|
<P> void |
forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? 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(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
Iterates over the iterable passing each element and the current relative int index to the specified instance of
ObjectIntProcedure
|
java.util.Iterator<T> |
iterator() |
int |
size()
Returns the number of items in this iterable.
|
aggregateBy, aggregateInPlaceBy, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, chunk, collect, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectIf, collectInt, collectLong, collectShort, collectWith, concatenate, contains, containsAll, containsAllArguments, containsAllIterable, count, detect, detectIfNone, drop, flatCollect, flatCollect, getFirst, getLast, groupBy, groupBy, groupByEach, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, notEmpty, partition, reject, reject, rejectWith, select, select, selectInstancesOf, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, take, toArray, toArray, toBag, toList, toMap, toSet, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toStack, toString, zip, zip, zipWithIndex, zipWithIndexpublic ReverseIterable(com.gs.collections.api.list.ListIterable<T> newAdapted)
public static <T> ReverseIterable<T> adapt(com.gs.collections.api.list.ListIterable<T> listIterable)
public void forEach(com.gs.collections.api.block.procedure.Procedure<? super T> procedure)
com.gs.collections.api.InternalIterablee.g. people.forEach(new Procedure() { public void value(Person person) { LOGGER.info(person.getName()); } });
public void forEachWithIndex(com.gs.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
com.gs.collections.api.InternalIterablee.g. people.forEachWithIndex(new ObjectIntProcedure() { public void value(Person person, int index) { LOGGER.info("Index: " + index + " person: " + person.getName()); } });
public <P> void forEachWith(com.gs.collections.api.block.procedure.Procedure2<? super T,? super P> procedure, P parameter)
com.gs.collections.api.InternalIterablee.g. people.forEachWith(new Procedure2() { public void value(Person person, Person other) { if (person.isRelatedTo(other)) { LOGGER.info(person.getName()); } } }, fred);
public int size()
com.gs.collections.api.RichIterablesize in interface com.gs.collections.api.RichIterable<T>size in class AbstractLazyIterable<T>public java.util.Iterator<T> iterator()