public final class IteratorIterate extends Object
Modifier and Type | Method | Description |
---|---|---|
static <T> Iterator<T> |
advanceIteratorTo(Iterator<T> iterator,
int from) |
|
static <T,K,V> MutableMap<K,V> |
aggregateBy(Iterator<T> iterator,
Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Function2<? super V,? super T,? extends V> nonMutatingAggregator) |
|
static <T,K,V> MutableMap<K,V> |
aggregateBy(Iterator<T> iterator,
Function<? super T,? extends K> groupBy,
Function0<? extends V> zeroValueFactory,
Procedure2<? super V,? super T> mutatingAggregator) |
|
static <T> boolean |
allSatisfy(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,P> boolean |
allSatisfyWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> boolean |
anySatisfy(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,P> boolean |
anySatisfyWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> RichIterable<RichIterable<T>> |
chunk(Iterator<T> iterator,
int size) |
|
static <T,V,R extends Collection<V>> |
collect(Iterator<T> iterator,
Function<? super T,? extends V> function,
R targetCollection) |
|
static <T> MutableBooleanCollection |
collectBoolean(Iterator<T> iterator,
BooleanFunction<? super T> booleanFunction) |
|
static <T,R extends MutableBooleanCollection> |
collectBoolean(Iterator<T> iterator,
BooleanFunction<? super T> booleanFunction,
R target) |
|
static <T> MutableByteCollection |
collectByte(Iterator<T> iterator,
ByteFunction<? super T> byteFunction) |
|
static <T,R extends MutableByteCollection> |
collectByte(Iterator<T> iterator,
ByteFunction<? super T> byteFunction,
R target) |
|
static <T> MutableCharCollection |
collectChar(Iterator<T> iterator,
CharFunction<? super T> charFunction) |
|
static <T,R extends MutableCharCollection> |
collectChar(Iterator<T> iterator,
CharFunction<? super T> charFunction,
R target) |
|
static <T> MutableDoubleCollection |
collectDouble(Iterator<T> iterator,
DoubleFunction<? super T> doubleFunction) |
|
static <T,R extends MutableDoubleCollection> |
collectDouble(Iterator<T> iterator,
DoubleFunction<? super T> doubleFunction,
R target) |
|
static <T> MutableFloatCollection |
collectFloat(Iterator<T> iterator,
FloatFunction<? super T> floatFunction) |
|
static <T,R extends MutableFloatCollection> |
collectFloat(Iterator<T> iterator,
FloatFunction<? super T> floatFunction,
R target) |
|
static <T,V,R extends Collection<V>> |
collectIf(Iterator<T> iterator,
Predicate<? super T> predicate,
Function<? super T,? extends V> function,
R targetCollection) |
|
static <T> MutableIntCollection |
collectInt(Iterator<T> iterator,
IntFunction<? super T> intFunction) |
|
static <T,R extends MutableIntCollection> |
collectInt(Iterator<T> iterator,
IntFunction<? super T> intFunction,
R target) |
|
static <T> MutableLongCollection |
collectLong(Iterator<T> iterator,
LongFunction<? super T> longFunction) |
|
static <T,R extends MutableLongCollection> |
collectLong(Iterator<T> iterator,
LongFunction<? super T> longFunction,
R target) |
|
static <T> MutableShortCollection |
collectShort(Iterator<T> iterator,
ShortFunction<? super T> shortFunction) |
|
static <T,R extends MutableShortCollection> |
collectShort(Iterator<T> iterator,
ShortFunction<? super T> shortFunction,
R target) |
|
static <T,P,A,R extends Collection<A>> |
collectWith(Iterator<T> iterator,
Function2<? super T,? super P,? extends A> function,
P parameter,
R targetCollection) |
|
static <T> int |
count(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,P> int |
countWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> T |
detect(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T> int |
detectIndex(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,IV> int |
detectIndexWith(Iterator<T> iterator,
Predicate2<? super T,? super IV> predicate,
IV injectedValue) |
|
static <T> Optional<T> |
detectOptional(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,P> T |
detectWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T,P> Optional<T> |
detectWithOptional(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> MutableList<T> |
distinct(Iterator<T> iterator) |
|
static <T> MutableList<T> |
distinct(Iterator<T> iterator,
HashingStrategy<? super T> hashingStrategy) |
|
static <T,R extends List<T>> |
distinct(Iterator<T> iterator,
R targetCollection) |
Deprecated.
in 7.0.
|
static <T,R extends MutableCollection<T>> |
dropWhile(Iterator<T> iterator,
Predicate<? super T> predicate,
R target) |
|
static <T,V,R extends Collection<V>> |
flatCollect(Iterator<T> iterator,
Function<? super T,? extends Iterable<V>> function,
R targetCollection) |
|
static <T> void |
forEach(Iterator<T> iterator,
Procedure<? super T> procedure) |
|
static <T,P> void |
forEachWith(Iterator<T> iterator,
Procedure2<? super T,? super P> procedure,
P parameter) |
|
static <T> void |
forEachWithIndex(Iterator<T> iterator,
ObjectIntProcedure<? super T> objectIntProcedure) |
|
static <T,V> ImmutableMultimap<V,T> |
groupBy(Iterator<T> iterator,
Function<? super T,? extends V> function) |
|
static <T,V,R extends MutableMultimap<V,T>> |
groupBy(Iterator<T> iterator,
Function<? super T,? extends V> function,
R target) |
|
static <T,V,R extends MutableMultimap<V,T>> |
groupByEach(Iterator<T> iterator,
Function<? super T,? extends Iterable<V>> function,
R target) |
|
static <K,T,R extends MutableMapIterable<K,T>> |
groupByUniqueKey(Iterator<T> iterator,
Function<? super T,? extends K> function,
R target) |
|
static <T> double |
injectInto(double injectValue,
Iterator<T> iterator,
DoubleObjectToDoubleFunction<? super T> function) |
|
static <T> float |
injectInto(float injectValue,
Iterator<T> iterator,
FloatObjectToFloatFunction<? super T> function) |
|
static <T> int |
injectInto(int injectValue,
Iterator<T> iterator,
IntObjectToIntFunction<? super T> function) |
|
static <T> long |
injectInto(long injectValue,
Iterator<T> iterator,
LongObjectToLongFunction<? super T> function) |
|
static <T,IV> IV |
injectInto(IV injectValue,
Iterator<T> iterator,
Function2<? super IV,? super T,? extends IV> function) |
|
static <T,IV,P> IV |
injectIntoWith(IV injectValue,
Iterator<T> iterator,
Function3<? super IV,? super T,? super P,? extends IV> function,
P parameter) |
|
static <T> T |
max(Iterator<T> iterator,
Comparator<? super T> comparator) |
|
static <T,V extends Comparable<? super V>> |
maxBy(Iterator<T> iterator,
Function<? super T,? extends V> function) |
|
static <T> T |
min(Iterator<T> iterator,
Comparator<? super T> comparator) |
|
static <T,V extends Comparable<? super V>> |
minBy(Iterator<T> iterator,
Function<? super T,? extends V> function) |
|
static <T> boolean |
noneSatisfy(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,P> boolean |
noneSatisfyWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> PartitionMutableList<T> |
partition(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T,R extends PartitionMutableCollection<T>> |
partitionWhile(Iterator<T> iterator,
Predicate<? super T> predicate,
R target) |
|
static <T,P> PartitionMutableList<T> |
partitionWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T,R extends Collection<T>> |
reject(Iterator<T> iterator,
Predicate<? super T> predicate,
R targetCollection) |
|
static <T,P,R extends Collection<T>> |
rejectWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter,
R targetCollection) |
|
static <T> boolean |
removeIf(Iterator<T> iterator,
Predicate<? super T> predicate) |
|
static <T> boolean |
removeIf(Iterator<T> iterator,
Predicate<? super T> predicate,
Procedure<? super T> procedure) |
|
static <T,P> boolean |
removeIfWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T,P> boolean |
removeIfWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter,
Procedure<? super T> procedure) |
|
static <T,R extends Collection<T>> |
select(Iterator<T> iterator,
Predicate<? super T> predicate,
R targetCollection) |
|
static <T,P> Twin<MutableList<T>> |
selectAndRejectWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T,R extends Collection<T>> |
selectInstancesOf(Iterator<?> iterator,
Class<T> clazz,
R targetCollection) |
|
static <T,P,R extends Collection<T>> |
selectWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate,
P injectedValue,
R targetCollection) |
|
static <T> boolean |
shortCircuit(Iterator<T> iterator,
Predicate<? super T> predicate,
boolean expected,
boolean onShortCircuit,
boolean atEnd) |
|
static <T,P> boolean |
shortCircuitWith(Iterator<T> iterator,
Predicate2<? super T,? super P> predicate2,
P parameter,
boolean expected,
boolean onShortCircuit,
boolean atEnd) |
|
static <V,T> MutableMap<V,BigDecimal> |
sumByBigDecimal(Iterator<T> iterator,
Function<? super T,? extends V> groupBy,
Function<? super T,BigDecimal> function) |
|
static <V,T> MutableMap<V,BigInteger> |
sumByBigInteger(Iterator<T> iterator,
Function<? super T,? extends V> groupBy,
Function<? super T,BigInteger> function) |
|
static <T> BigDecimal |
sumOfBigDecimal(Iterator<T> iterator,
Function<? super T,BigDecimal> function) |
|
static <T> BigInteger |
sumOfBigInteger(Iterator<T> iterator,
Function<? super T,BigInteger> function) |
|
static <T> double |
sumOfDouble(Iterator<T> iterator,
DoubleFunction<? super T> function) |
|
static <T> double |
sumOfFloat(Iterator<T> iterator,
FloatFunction<? super T> function) |
|
static <T> long |
sumOfInt(Iterator<T> iterator,
IntFunction<? super T> function) |
|
static <T> long |
sumOfLong(Iterator<T> iterator,
LongFunction<? super T> function) |
|
static <T,R extends MutableCollection<T>> |
takeWhile(Iterator<T> iterator,
Predicate<? super T> predicate,
R target) |
|
static <X,Y,R extends Collection<Pair<X,Y>>> |
zip(Iterator<X> xs,
Iterator<Y> ys,
R target) |
|
static <T,R extends Collection<Pair<T,Integer>>> |
zipWithIndex(Iterator<T> iterator,
R target) |
public static <T,P> Twin<MutableList<T>> selectAndRejectWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> PartitionMutableList<T> partition(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.partition(Iterable, Predicate)
public static <T,P> PartitionMutableList<T> partitionWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
Iterate.partitionWith(Iterable, Predicate2, Object)
public static <T,R extends PartitionMutableCollection<T>> R partitionWhile(Iterator<T> iterator, Predicate<? super T> predicate, R target)
public static <T,R extends MutableCollection<T>> R takeWhile(Iterator<T> iterator, Predicate<? super T> predicate, R target)
public static <T,R extends MutableCollection<T>> R dropWhile(Iterator<T> iterator, Predicate<? super T> predicate, R target)
public static <T> int count(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.count(Iterable, Predicate)
public static <T,P> int countWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,R extends Collection<T>> R select(Iterator<T> iterator, Predicate<? super T> predicate, R targetCollection)
public static <T,P,R extends Collection<T>> R selectWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P injectedValue, R targetCollection)
public static <T,R extends Collection<T>> R selectInstancesOf(Iterator<?> iterator, Class<T> clazz, R targetCollection)
public static <T,V,R extends Collection<V>> R collectIf(Iterator<T> iterator, Predicate<? super T> predicate, Function<? super T,? extends V> function, R targetCollection)
public static <T,R extends Collection<T>> R reject(Iterator<T> iterator, Predicate<? super T> predicate, R targetCollection)
public static <T,P,R extends Collection<T>> R rejectWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter, R targetCollection)
public static <T,V,R extends Collection<V>> R collect(Iterator<T> iterator, Function<? super T,? extends V> function, R targetCollection)
public static <T> MutableBooleanCollection collectBoolean(Iterator<T> iterator, BooleanFunction<? super T> booleanFunction)
public static <T,R extends MutableBooleanCollection> R collectBoolean(Iterator<T> iterator, BooleanFunction<? super T> booleanFunction, R target)
public static <T> MutableByteCollection collectByte(Iterator<T> iterator, ByteFunction<? super T> byteFunction)
public static <T,R extends MutableByteCollection> R collectByte(Iterator<T> iterator, ByteFunction<? super T> byteFunction, R target)
public static <T> MutableCharCollection collectChar(Iterator<T> iterator, CharFunction<? super T> charFunction)
public static <T,R extends MutableCharCollection> R collectChar(Iterator<T> iterator, CharFunction<? super T> charFunction, R target)
public static <T> MutableDoubleCollection collectDouble(Iterator<T> iterator, DoubleFunction<? super T> doubleFunction)
public static <T,R extends MutableDoubleCollection> R collectDouble(Iterator<T> iterator, DoubleFunction<? super T> doubleFunction, R target)
public static <T> MutableFloatCollection collectFloat(Iterator<T> iterator, FloatFunction<? super T> floatFunction)
public static <T,R extends MutableFloatCollection> R collectFloat(Iterator<T> iterator, FloatFunction<? super T> floatFunction, R target)
public static <T> MutableIntCollection collectInt(Iterator<T> iterator, IntFunction<? super T> intFunction)
public static <T,R extends MutableIntCollection> R collectInt(Iterator<T> iterator, IntFunction<? super T> intFunction, R target)
public static <T> MutableLongCollection collectLong(Iterator<T> iterator, LongFunction<? super T> longFunction)
public static <T,R extends MutableLongCollection> R collectLong(Iterator<T> iterator, LongFunction<? super T> longFunction, R target)
public static <T> MutableShortCollection collectShort(Iterator<T> iterator, ShortFunction<? super T> shortFunction)
public static <T,R extends MutableShortCollection> R collectShort(Iterator<T> iterator, ShortFunction<? super T> shortFunction, R target)
public static <T,V,R extends Collection<V>> R flatCollect(Iterator<T> iterator, Function<? super T,? extends Iterable<V>> function, R targetCollection)
public static <T> void forEach(Iterator<T> iterator, Procedure<? super T> procedure)
Iterate.forEach(Iterable, Procedure)
public static <T> void forEachWithIndex(Iterator<T> iterator, ObjectIntProcedure<? super T> objectIntProcedure)
public static <T> T detect(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.detect(Iterable, Predicate)
public static <T,P> T detectWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> Optional<T> detectOptional(Iterator<T> iterator, Predicate<? super T> predicate)
public static <T,P> Optional<T> detectWithOptional(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T,IV> IV injectInto(IV injectValue, Iterator<T> iterator, Function2<? super IV,? super T,? extends IV> function)
public static <T> int injectInto(int injectValue, Iterator<T> iterator, IntObjectToIntFunction<? super T> function)
public static <T> long injectInto(long injectValue, Iterator<T> iterator, LongObjectToLongFunction<? super T> function)
public static <T> double injectInto(double injectValue, Iterator<T> iterator, DoubleObjectToDoubleFunction<? super T> function)
public static <T> float injectInto(float injectValue, Iterator<T> iterator, FloatObjectToFloatFunction<? super T> function)
public static <T,IV,P> IV injectIntoWith(IV injectValue, Iterator<T> iterator, Function3<? super IV,? super T,? super P,? extends IV> function, P parameter)
public static <T> boolean shortCircuit(Iterator<T> iterator, Predicate<? super T> predicate, boolean expected, boolean onShortCircuit, boolean atEnd)
public static <T,P> boolean shortCircuitWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate2, P parameter, boolean expected, boolean onShortCircuit, boolean atEnd)
public static <T> boolean anySatisfy(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.anySatisfy(Iterable, Predicate)
public static <T,P> boolean anySatisfyWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> boolean allSatisfy(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.allSatisfy(Iterable, Predicate)
public static <T,P> boolean allSatisfyWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> boolean noneSatisfy(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.noneSatisfy(Iterable, Predicate)
public static <T,P> boolean noneSatisfyWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> boolean removeIf(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.removeIf(Iterable, Predicate)
public static <T,P> boolean removeIfWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter)
public static <T> boolean removeIf(Iterator<T> iterator, Predicate<? super T> predicate, Procedure<? super T> procedure)
public static <T,P> boolean removeIfWith(Iterator<T> iterator, Predicate2<? super T,? super P> predicate, P parameter, Procedure<? super T> procedure)
public static <T> int detectIndex(Iterator<T> iterator, Predicate<? super T> predicate)
Iterate.detectIndex(Iterable, Predicate)
public static <T,IV> int detectIndexWith(Iterator<T> iterator, Predicate2<? super T,? super IV> predicate, IV injectedValue)
public static <T,P> void forEachWith(Iterator<T> iterator, Procedure2<? super T,? super P> procedure, P parameter)
public static <T,P,A,R extends Collection<A>> R collectWith(Iterator<T> iterator, Function2<? super T,? super P,? extends A> function, P parameter, R targetCollection)
public static <T,V> ImmutableMultimap<V,T> groupBy(Iterator<T> iterator, Function<? super T,? extends V> function)
Iterate.groupBy(Iterable, Function)
public static <T,V,R extends MutableMultimap<V,T>> R groupBy(Iterator<T> iterator, Function<? super T,? extends V> function, R target)
public static <T,V,R extends MutableMultimap<V,T>> R groupByEach(Iterator<T> iterator, Function<? super T,? extends Iterable<V>> function, R target)
public static <K,T,R extends MutableMapIterable<K,T>> R groupByUniqueKey(Iterator<T> iterator, Function<? super T,? extends K> function, R target)
@Deprecated public static <T,R extends List<T>> R distinct(Iterator<T> iterator, R targetCollection)
public static <T> MutableList<T> distinct(Iterator<T> iterator)
public static <T> MutableList<T> distinct(Iterator<T> iterator, HashingStrategy<? super T> hashingStrategy)
public static <X,Y,R extends Collection<Pair<X,Y>>> R zip(Iterator<X> xs, Iterator<Y> ys, R target)
public static <T,R extends Collection<Pair<T,Integer>>> R zipWithIndex(Iterator<T> iterator, R target)
public static <T> RichIterable<RichIterable<T>> chunk(Iterator<T> iterator, int size)
Iterate.chunk(Iterable, int)
public static <T> T min(Iterator<T> iterator, Comparator<? super T> comparator)
Iterate.min(Iterable, Comparator)
public static <T> T max(Iterator<T> iterator, Comparator<? super T> comparator)
Iterate.max(Iterable, Comparator)
public static <T> long sumOfInt(Iterator<T> iterator, IntFunction<? super T> function)
public static <T> long sumOfLong(Iterator<T> iterator, LongFunction<? super T> function)
public static <T> double sumOfFloat(Iterator<T> iterator, FloatFunction<? super T> function)
public static <T> double sumOfDouble(Iterator<T> iterator, DoubleFunction<? super T> function)
public static <T> BigDecimal sumOfBigDecimal(Iterator<T> iterator, Function<? super T,BigDecimal> function)
public static <T> BigInteger sumOfBigInteger(Iterator<T> iterator, Function<? super T,BigInteger> function)
public static <V,T> MutableMap<V,BigDecimal> sumByBigDecimal(Iterator<T> iterator, Function<? super T,? extends V> groupBy, Function<? super T,BigDecimal> function)
public static <V,T> MutableMap<V,BigInteger> sumByBigInteger(Iterator<T> iterator, Function<? super T,? extends V> groupBy, Function<? super T,BigInteger> function)
public static <T,K,V> MutableMap<K,V> aggregateBy(Iterator<T> iterator, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Procedure2<? super V,? super T> mutatingAggregator)
public static <T,K,V> MutableMap<K,V> aggregateBy(Iterator<T> iterator, Function<? super T,? extends K> groupBy, Function0<? extends V> zeroValueFactory, Function2<? super V,? super T,? extends V> nonMutatingAggregator)
public static <T,V extends Comparable<? super V>> T minBy(Iterator<T> iterator, Function<? super T,? extends V> function)
public static <T,V extends Comparable<? super V>> T maxBy(Iterator<T> iterator, Function<? super T,? extends V> function)
Copyright © 2004–2019. All rights reserved.