public abstract class AbstractRichIterable<T> extends Object implements RichIterable<T>
| Constructor and Description |
|---|
AbstractRichIterable() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(Predicate<? super T> predicate) |
<P> boolean |
allSatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
anySatisfy(Predicate<? super T> predicate) |
<P> boolean |
anySatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
void |
appendString(Appendable appendable,
String separator) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
LazyIterable<T> |
asLazy() |
<V,R extends Collection<V>> |
collect(Function<? super T,? extends V> function,
R target) |
<V,R extends Collection<V>> |
collectIf(Predicate<? super T> predicate,
Function<? super T,? extends V> function,
R target) |
<P,V,R extends Collection<V>> |
collectWith(Function2<? super T,? super P,? extends V> function,
P parameter,
R target) |
boolean |
contains(Object object) |
boolean |
containsAll(Collection<?> collection) |
boolean |
containsAllArguments(Object... elements) |
boolean |
containsAllIterable(Iterable<?> source) |
int |
count(Predicate<? super T> predicate) |
<V> Bag<V> |
countByEach(Function<? super T,? extends Iterable<V>> function) |
<P> int |
countWith(Predicate2<? super T,? super P> predicate,
P parameter) |
T |
detect(Predicate<? super T> predicate) |
Optional<T> |
detectOptional(Predicate<? super T> predicate) |
<P> T |
detectWith(Predicate2<? super T,? super P> predicate,
P parameter) |
<P> T |
detectWithIfNone(Predicate2<? super T,? super P> predicate,
P parameter,
Function0<? extends T> function) |
<P> Optional<T> |
detectWithOptional(Predicate2<? super T,? super P> predicate,
P parameter) |
<V,R extends Collection<V>> |
flatCollect(Function<? super T,? extends Iterable<V>> function,
R target) |
void |
forEach(Procedure<? super T> procedure) |
<P> void |
forEachWith(Procedure2<? super T,? super P> procedure,
P parameter) |
void |
forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) |
<V,R extends MutableMultimap<V,T>> |
groupBy(Function<? super T,? extends V> function,
R target) |
<V,R extends MutableMultimap<V,T>> |
groupByEach(Function<? super T,? extends Iterable<V>> function,
R target) |
<V,R extends MutableMapIterable<V,T>> |
groupByUniqueKey(Function<? super T,? extends V> function,
R target) |
double |
injectInto(double injectedValue,
DoubleObjectToDoubleFunction<? super T> function) |
float |
injectInto(float injectedValue,
FloatObjectToFloatFunction<? super T> function) |
int |
injectInto(int injectedValue,
IntObjectToIntFunction<? super T> function) |
<IV> IV |
injectInto(IV injectedValue,
Function2<? super IV,? super T,? extends IV> function) |
long |
injectInto(long injectedValue,
LongObjectToLongFunction<? super T> function) |
<R extends Collection<T>> |
into(R target) |
boolean |
isEmpty() |
T |
max() |
T |
max(Comparator<? super T> comparator) |
<V extends Comparable<? super V>> |
maxBy(Function<? super T,? extends V> function) |
T |
min() |
T |
min(Comparator<? super T> comparator) |
<V extends Comparable<? super V>> |
minBy(Function<? super T,? extends V> function) |
boolean |
noneSatisfy(Predicate<? super T> predicate) |
<P> boolean |
noneSatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
<R extends Collection<T>> |
reject(Predicate<? super T> predicate,
R target) |
<P,R extends Collection<T>> |
rejectWith(Predicate2<? super T,? super P> predicate,
P parameter,
R target) |
<R extends Collection<T>> |
select(Predicate<? super T> predicate,
R target) |
<P,R extends Collection<T>> |
selectWith(Predicate2<? super T,? super P> predicate,
P parameter,
R target) |
double |
sumOfDouble(DoubleFunction<? super T> function) |
double |
sumOfFloat(FloatFunction<? super T> function) |
long |
sumOfInt(IntFunction<? super T> function) |
long |
sumOfLong(LongFunction<? super T> function) |
Object[] |
toArray() |
<E> E[] |
toArray(E[] array) |
MutableBag<T> |
toBag() |
<K,V> MutableBiMap<K,V> |
toBiMap(Function<? super T,? extends K> keyFunction,
Function<? super T,? extends V> valueFunction) |
MutableList<T> |
toList() |
<K,V> MutableMap<K,V> |
toMap(Function<? super T,? extends K> keyFunction,
Function<? super T,? extends V> valueFunction) |
MutableSet<T> |
toSet() |
MutableSortedBag<T> |
toSortedBag() |
MutableSortedBag<T> |
toSortedBag(Comparator<? super T> comparator) |
<V extends Comparable<? super V>> |
toSortedBagBy(Function<? super T,? extends V> function) |
<V extends Comparable<? super V>> |
toSortedListBy(Function<? super T,? extends V> function) |
<K,V> MutableSortedMap<K,V> |
toSortedMap(Comparator<? super K> comparator,
Function<? super T,? extends K> keyFunction,
Function<? super T,? extends V> valueFunction) |
<K,V> MutableSortedMap<K,V> |
toSortedMap(Function<? super T,? extends K> keyFunction,
Function<? super T,? extends V> valueFunction) |
<KK extends Comparable<? super KK>,NK,NV> |
toSortedMapBy(Function<? super NK,KK> sortBy,
Function<? super T,? extends NK> keyFunction,
Function<? super T,? extends NV> valueFunction) |
MutableSortedSet<T> |
toSortedSet() |
MutableSortedSet<T> |
toSortedSet(Comparator<? super T> comparator) |
<V extends Comparable<? super V>> |
toSortedSetBy(Function<? super T,? extends V> function) |
String |
toString()
Returns a string with the elements of the iterable separated by commas with spaces and
enclosed in square brackets.
|
<S,R extends Collection<Pair<T,S>>> |
zip(Iterable<S> that,
R target) |
<R extends Collection<Pair<T,Integer>>> |
zipWithIndex(R target) |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaggregateBy, aggregateBy, aggregateInPlaceBy, appendString, chunk, collect, collectBoolean, collectBoolean, collectByte, collectByte, collectChar, collectChar, collectDouble, collectDouble, collectFloat, collectFloat, collectIf, collectInt, collectInt, collectLong, collectLong, collectShort, collectShort, collectWith, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countBy, countByEach, countByWith, countByWith, detectIfNone, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, flatCollectWith, getAny, getFirst, getLast, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, notEmpty, partition, partitionWith, reduce, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectInstancesOf, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, tap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toMap, toSortedList, toSortedList, zip, zipWithIndexforEachiterator, spliteratorpublic boolean contains(Object object)
contains in interface RichIterable<T>public boolean containsAllIterable(Iterable<?> source)
containsAllIterable in interface RichIterable<T>public boolean containsAllArguments(Object... elements)
containsAllArguments in interface RichIterable<T>public Object[] toArray()
toArray in interface RichIterable<T>public <E> E[] toArray(E[] array)
toArray in interface RichIterable<T>public boolean isEmpty()
isEmpty in interface RichIterable<T>public MutableList<T> toList()
toList in interface RichIterable<T>public <V extends Comparable<? super V>> MutableList<T> toSortedListBy(Function<? super T,? extends V> function)
toSortedListBy in interface RichIterable<T>public MutableSortedSet<T> toSortedSet()
toSortedSet in interface RichIterable<T>public MutableSortedSet<T> toSortedSet(Comparator<? super T> comparator)
toSortedSet in interface RichIterable<T>public <V extends Comparable<? super V>> MutableSortedSet<T> toSortedSetBy(Function<? super T,? extends V> function)
toSortedSetBy in interface RichIterable<T>public MutableSet<T> toSet()
toSet in interface RichIterable<T>public MutableBag<T> toBag()
toBag in interface RichIterable<T>public MutableSortedBag<T> toSortedBag()
toSortedBag in interface RichIterable<T>public MutableSortedBag<T> toSortedBag(Comparator<? super T> comparator)
toSortedBag in interface RichIterable<T>public <V extends Comparable<? super V>> MutableSortedBag<T> toSortedBagBy(Function<? super T,? extends V> function)
toSortedBagBy in interface RichIterable<T>public <K,V> MutableMap<K,V> toMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)
toMap in interface RichIterable<T>public <K,V> MutableSortedMap<K,V> toSortedMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)
toSortedMap in interface RichIterable<T>public <K,V> MutableSortedMap<K,V> toSortedMap(Comparator<? super K> comparator, Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)
toSortedMap in interface RichIterable<T>public <KK extends Comparable<? super KK>,NK,NV> MutableSortedMap<NK,NV> toSortedMapBy(Function<? super NK,KK> sortBy, Function<? super T,? extends NK> keyFunction, Function<? super T,? extends NV> valueFunction)
toSortedMapBy in interface RichIterable<T>public <K,V> MutableBiMap<K,V> toBiMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)
toBiMap in interface RichIterable<T>public <R extends Collection<T>> R select(Predicate<? super T> predicate, R target)
select in interface RichIterable<T>public <P,R extends Collection<T>> R selectWith(Predicate2<? super T,? super P> predicate, P parameter, R target)
selectWith in interface RichIterable<T>public <R extends Collection<T>> R reject(Predicate<? super T> predicate, R target)
reject in interface RichIterable<T>public <P,R extends Collection<T>> R rejectWith(Predicate2<? super T,? super P> predicate, P parameter, R target)
rejectWith in interface RichIterable<T>public <V,R extends Collection<V>> R collect(Function<? super T,? extends V> function, R target)
collect in interface RichIterable<T>public <P,V,R extends Collection<V>> R collectWith(Function2<? super T,? super P,? extends V> function, P parameter, R target)
collectWith in interface RichIterable<T>public <V,R extends Collection<V>> R collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function, R target)
collectIf in interface RichIterable<T>public <P> T detectWithIfNone(Predicate2<? super T,? super P> predicate, P parameter, Function0<? extends T> function)
detectWithIfNone in interface RichIterable<T>public T min(Comparator<? super T> comparator)
min in interface RichIterable<T>public T max(Comparator<? super T> comparator)
max in interface RichIterable<T>public T min()
min in interface RichIterable<T>public T max()
max in interface RichIterable<T>public <V extends Comparable<? super V>> T minBy(Function<? super T,? extends V> function)
minBy in interface RichIterable<T>public <V extends Comparable<? super V>> T maxBy(Function<? super T,? extends V> function)
maxBy in interface RichIterable<T>public LazyIterable<T> asLazy()
asLazy in interface RichIterable<T>public <V,R extends Collection<V>> R flatCollect(Function<? super T,? extends Iterable<V>> function, R target)
flatCollect in interface RichIterable<T>public T detect(Predicate<? super T> predicate)
detect in interface RichIterable<T>public <P> T detectWith(Predicate2<? super T,? super P> predicate, P parameter)
detectWith in interface RichIterable<T>public Optional<T> detectOptional(Predicate<? super T> predicate)
detectOptional in interface RichIterable<T>public <P> Optional<T> detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
detectWithOptional in interface RichIterable<T>public boolean anySatisfy(Predicate<? super T> predicate)
anySatisfy in interface RichIterable<T>public boolean allSatisfy(Predicate<? super T> predicate)
allSatisfy in interface RichIterable<T>public boolean noneSatisfy(Predicate<? super T> predicate)
noneSatisfy in interface RichIterable<T>public <P> boolean anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
anySatisfyWith in interface RichIterable<T>public <P> boolean allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
allSatisfyWith in interface RichIterable<T>public <P> boolean noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
noneSatisfyWith in interface RichIterable<T>public int count(Predicate<? super T> predicate)
count in interface RichIterable<T>public <P> int countWith(Predicate2<? super T,? super P> predicate, P parameter)
countWith in interface RichIterable<T>public <IV> IV injectInto(IV injectedValue,
Function2<? super IV,? super T,? extends IV> function)
injectInto in interface RichIterable<T>public int injectInto(int injectedValue,
IntObjectToIntFunction<? super T> function)
injectInto in interface RichIterable<T>public long injectInto(long injectedValue,
LongObjectToLongFunction<? super T> function)
injectInto in interface RichIterable<T>public double injectInto(double injectedValue,
DoubleObjectToDoubleFunction<? super T> function)
injectInto in interface RichIterable<T>public <R extends Collection<T>> R into(R target)
into in interface RichIterable<T>public float injectInto(float injectedValue,
FloatObjectToFloatFunction<? super T> function)
injectInto in interface RichIterable<T>public long sumOfInt(IntFunction<? super T> function)
sumOfInt in interface RichIterable<T>public double sumOfFloat(FloatFunction<? super T> function)
sumOfFloat in interface RichIterable<T>public long sumOfLong(LongFunction<? super T> function)
sumOfLong in interface RichIterable<T>public double sumOfDouble(DoubleFunction<? super T> function)
sumOfDouble in interface RichIterable<T>public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface InternalIterable<T>public final void forEach(Procedure<? super T> procedure)
forEach in interface InternalIterable<T>forEach in interface RichIterable<T>public <P> void forEachWith(Procedure2<? super T,? super P> procedure, P parameter)
forEachWith in interface InternalIterable<T>public <S,R extends Collection<Pair<T,S>>> R zip(Iterable<S> that, R target)
zip in interface RichIterable<T>public <R extends Collection<Pair<T,Integer>>> R zipWithIndex(R target)
zipWithIndex in interface RichIterable<T>public String toString()
Assert.assertEquals("[]", Lists.mutable.empty().toString());
Assert.assertEquals("[1]", Lists.mutable.with(1).toString());
Assert.assertEquals("[1, 2, 3]", Lists.mutable.with(1, 2, 3).toString());
toString in interface RichIterable<T>toString in class ObjectAbstractCollection.toString()public void appendString(Appendable appendable, String separator)
appendString in interface RichIterable<T>public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface RichIterable<T>public boolean containsAll(Collection<?> collection)
containsAll in interface RichIterable<T>public <V> Bag<V> countByEach(Function<? super T,? extends Iterable<V>> function)
countByEach in interface RichIterable<T>public <V,R extends MutableMultimap<V,T>> R groupBy(Function<? super T,? extends V> function, R target)
groupBy in interface RichIterable<T>public <V,R extends MutableMultimap<V,T>> R groupByEach(Function<? super T,? extends Iterable<V>> function, R target)
groupByEach in interface RichIterable<T>public <V,R extends MutableMapIterable<V,T>> R groupByUniqueKey(Function<? super T,? extends V> function, R target)
groupByUniqueKey in interface RichIterable<T>Copyright © 2004–2022. All rights reserved.