Class AbstractCollectionAdapter<T>
java.lang.Object
org.eclipse.collections.impl.collection.mutable.AbstractCollectionAdapter<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,MutableCollection<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
AbstractListAdapter,CollectionAdapter,SetAdapter,SortedSetAdapter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends T> collection) booleanaddAllIterable(Iterable<? extends T> iterable) booleanallSatisfy(Predicate<? super T> predicate) <P> booleanallSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter) booleananySatisfy(Predicate<? super T> predicate) <P> booleananySatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()chunk(int size) voidclear()<V> MutableCollection<V><V,R extends Collection<V>>
R<R extends MutableBooleanCollection>
RcollectBoolean(BooleanFunction<? super T> booleanFunction, R target) <R extends MutableByteCollection>
RcollectByte(ByteFunction<? super T> byteFunction, R target) <R extends MutableCharCollection>
RcollectChar(CharFunction<? super T> charFunction, R target) <R extends MutableDoubleCollection>
RcollectDouble(DoubleFunction<? super T> doubleFunction, R target) <R extends MutableFloatCollection>
RcollectFloat(FloatFunction<? super T> floatFunction, R target) <V> MutableCollection<V><V,R extends Collection<V>>
R<R extends MutableIntCollection>
RcollectInt(IntFunction<? super T> intFunction, R target) <R extends MutableLongCollection>
RcollectLong(LongFunction<? super T> longFunction, R target) <R extends MutableShortCollection>
RcollectShort(ShortFunction<? super T> shortFunction, R target) <P,A, R extends Collection<A>>
RcollectWith(Function2<? super T, ? super P, ? extends A> function, P parameter, R targetCollection) <P,V> MutableCollection<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter) booleanbooleancontainsAll(Collection<?> collection) booleancontainsAllArguments(Object... elements) booleancontainsAllIterable(Iterable<?> source) int<P> intcountWith(Predicate2<? super T, ? super P> predicate, P parameter) detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function) detectOptional(Predicate<? super T> predicate) <P> TdetectWith(Predicate2<? super T, ? super P> predicate, P parameter) <P> TdetectWithIfNone(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function) detectWithOptional(Predicate2<? super T, ? super P> predicate, P parameter) void<V> MutableCollection<V>flatCollect(Function<? super T, ? extends Iterable<V>> function) <V,R extends Collection<V>>
RflatCollect(Function<? super T, ? extends Iterable<V>> function, R target) <P> voidforEachWith(Procedure2<? super T, ? super P> procedure, P parameter) voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure) getFirst()getLast()getOnly()<V> MutableMultimap<V,T> <V,R extends MutableMultimap<V, T>>
R<V> MutableMultimap<V,T> groupByEach(Function<? super T, ? extends Iterable<V>> function) <V,R extends MutableMultimap<V, T>>
RgroupByEach(Function<? super T, ? extends Iterable<V>> function, R target) <V> MutableMap<V,T> groupByUniqueKey(Function<? super T, ? extends V> function) <V,R extends MutableMapIterable<V, T>>
RgroupByUniqueKey(Function<? super T, ? extends V> function, R target) doubleinjectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> function) floatinjectInto(float injectedValue, FloatObjectToFloatFunction<? super T> function) intinjectInto(int injectedValue, IntObjectToIntFunction<? super T> function) longinjectInto(long injectedValue, LongObjectToLongFunction<? super T> function) <IV> IVinjectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function) <IV,P> IV injectIntoWith(IV injectValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter) <R extends Collection<T>>
Rinto(R target) booleanisEmpty()iterator()max()max(Comparator<? super T> comparator) <V extends Comparable<? super V>>
Tmin()min(Comparator<? super T> comparator) <V extends Comparable<? super V>>
TbooleannoneSatisfy(Predicate<? super T> predicate) <P> booleannoneSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter) booleannotEmpty()partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) <R extends Collection<T>>
R<P> MutableCollection<T>rejectWith(Predicate2<? super T, ? super P> predicate, P parameter) <P,R extends Collection<T>>
RrejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection) booleanbooleanremoveAll(Collection<?> collection) booleanremoveAllIterable(Iterable<?> iterable) boolean<P> booleanremoveIfWith(Predicate2<? super T, ? super P> predicate, P parameter) booleanretainAll(Collection<?> collection) booleanretainAllIterable(Iterable<?> iterable) <R extends Collection<T>>
R<P> Twin<MutableList<T>>selectAndRejectWith(Predicate2<? super T, ? super P> predicate, P parameter) <S> MutableCollection<S>selectInstancesOf(Class<S> clazz) <P> MutableCollection<T>selectWith(Predicate2<? super T, ? super P> predicate, P parameter) <P,R extends Collection<T>>
RselectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection) intsize()<V> MutableObjectDoubleMap<V>sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) <V> MutableObjectDoubleMap<V>sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) <V> MutableObjectLongMap<V>sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) <V> MutableObjectLongMap<V>sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) doublesumOfDouble(DoubleFunction<? super T> function) doublesumOfFloat(FloatFunction<? super T> function) longsumOfInt(IntFunction<? super T> function) longsumOfLong(LongFunction<? super T> function) Object[]toArray()<E> E[]toArray(E[] a) toBag()<K,V> MutableBiMap<K, V> toList()<K,V> MutableMap<K, V> <K,V, R extends Map<K, V>>
RtoMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, R target) toSet()toSortedBag(Comparator<? super T> comparator) toSortedList(Comparator<? super T> comparator) <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) toSortedSet(Comparator<? super T> comparator) toString()<S> MutableCollection<Pair<T,S>> <S,R extends Collection<Pair<T, S>>>
R<R extends Collection<Pair<T,Integer>>>
RzipWithIndex(R target) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEachMethods inherited from interface org.eclipse.collections.api.collection.MutableCollection
aggregateBy, aggregateInPlaceBy, asSynchronized, asUnmodifiable, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, countBy, countByEach, countByWith, flatCollectWith, newEmpty, toImmutable, with, withAll, without, withoutAllMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, appendString, appendString, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupByAndCollect, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, reduce, reduceBy, reduceBy, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toSortedBagBy, toSortedList, toSortedListBy, toSortedMapBy, toSortedSetBy
-
Constructor Details
-
AbstractCollectionAdapter
public AbstractCollectionAdapter()
-
-
Method Details
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfaceRichIterable<T>
-
getFirst
- Specified by:
getFirstin interfaceRichIterable<T>
-
getLast
- Specified by:
getLastin interfaceRichIterable<T>
-
getOnly
- Specified by:
getOnlyin interfaceRichIterable<T>
-
tap
- Specified by:
tapin interfaceMutableCollection<T>- Specified by:
tapin interfaceRichIterable<T>
-
each
- Specified by:
eachin interfaceRichIterable<T>
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>
-
removeIf
- Specified by:
removeIfin interfaceMutableCollection<T>
-
removeIfWith
- Specified by:
removeIfWithin interfaceMutableCollection<T>
-
detect
- Specified by:
detectin interfaceRichIterable<T>
-
detectWith
- Specified by:
detectWithin interfaceRichIterable<T>
-
detectOptional
- Specified by:
detectOptionalin interfaceRichIterable<T>
-
detectWithOptional
- Specified by:
detectWithOptionalin interfaceRichIterable<T>
-
detectIfNone
- Specified by:
detectIfNonein interfaceRichIterable<T>
-
detectWithIfNone
public <P> T detectWithIfNone(Predicate2<? super T, ? super P> predicate, P parameter, Function0<? extends T> function) - Specified by:
detectWithIfNonein interfaceRichIterable<T>
-
min
- Specified by:
minin interfaceRichIterable<T>
-
max
- Specified by:
maxin interfaceRichIterable<T>
-
min
- Specified by:
minin interfaceRichIterable<T>
-
max
- Specified by:
maxin interfaceRichIterable<T>
-
minBy
- Specified by:
minByin interfaceRichIterable<T>
-
maxBy
- Specified by:
maxByin interfaceRichIterable<T>
-
count
- Specified by:
countin interfaceRichIterable<T>
-
anySatisfy
- Specified by:
anySatisfyin interfaceRichIterable<T>
-
allSatisfy
- Specified by:
allSatisfyin interfaceRichIterable<T>
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>
-
sumOfInt
- Specified by:
sumOfIntin interfaceRichIterable<T>
-
sumOfFloat
- Specified by:
sumOfFloatin interfaceRichIterable<T>
-
sumOfLong
- Specified by:
sumOfLongin interfaceRichIterable<T>
-
sumOfDouble
- Specified by:
sumOfDoublein interfaceRichIterable<T>
-
sumByInt
public <V> MutableObjectLongMap<V> sumByInt(Function<? super T, ? extends V> groupBy, IntFunction<? super T> function) - Specified by:
sumByIntin interfaceMutableCollection<T>- Specified by:
sumByIntin interfaceRichIterable<T>
-
sumByFloat
public <V> MutableObjectDoubleMap<V> sumByFloat(Function<? super T, ? extends V> groupBy, FloatFunction<? super T> function) - Specified by:
sumByFloatin interfaceMutableCollection<T>- Specified by:
sumByFloatin interfaceRichIterable<T>
-
sumByLong
public <V> MutableObjectLongMap<V> sumByLong(Function<? super T, ? extends V> groupBy, LongFunction<? super T> function) - Specified by:
sumByLongin interfaceMutableCollection<T>- Specified by:
sumByLongin interfaceRichIterable<T>
-
sumByDouble
public <V> MutableObjectDoubleMap<V> sumByDouble(Function<? super T, ? extends V> groupBy, DoubleFunction<? super T> function) - Specified by:
sumByDoublein interfaceMutableCollection<T>- Specified by:
sumByDoublein interfaceRichIterable<T>
-
select
- Specified by:
selectin interfaceMutableCollection<T>- Specified by:
selectin interfaceRichIterable<T>
-
select
- Specified by:
selectin interfaceRichIterable<T>
-
reject
- Specified by:
rejectin interfaceMutableCollection<T>- Specified by:
rejectin interfaceRichIterable<T>
-
reject
- Specified by:
rejectin interfaceRichIterable<T>
-
selectInstancesOf
- Specified by:
selectInstancesOfin interfaceMutableCollection<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>
-
collect
- Specified by:
collectin interfaceMutableCollection<T>- Specified by:
collectin interfaceRichIterable<T>
-
collectBoolean
public <R extends MutableBooleanCollection> R collectBoolean(BooleanFunction<? super T> booleanFunction, R target) - Specified by:
collectBooleanin interfaceRichIterable<T>
-
collectByte
public <R extends MutableByteCollection> R collectByte(ByteFunction<? super T> byteFunction, R target) - Specified by:
collectBytein interfaceRichIterable<T>
-
collectChar
public <R extends MutableCharCollection> R collectChar(CharFunction<? super T> charFunction, R target) - Specified by:
collectCharin interfaceRichIterable<T>
-
collectDouble
public <R extends MutableDoubleCollection> R collectDouble(DoubleFunction<? super T> doubleFunction, R target) - Specified by:
collectDoublein interfaceRichIterable<T>
-
collectFloat
public <R extends MutableFloatCollection> R collectFloat(FloatFunction<? super T> floatFunction, R target) - Specified by:
collectFloatin interfaceRichIterable<T>
-
collectInt
- Specified by:
collectIntin interfaceRichIterable<T>
-
collectLong
public <R extends MutableLongCollection> R collectLong(LongFunction<? super T> longFunction, R target) - Specified by:
collectLongin interfaceRichIterable<T>
-
collectShort
public <R extends MutableShortCollection> R collectShort(ShortFunction<? super T> shortFunction, R target) - Specified by:
collectShortin interfaceRichIterable<T>
-
collect
- Specified by:
collectin interfaceRichIterable<T>
-
flatCollect
- Specified by:
flatCollectin interfaceMutableCollection<T>- Specified by:
flatCollectin interfaceRichIterable<T>
-
flatCollect
public <V,R extends Collection<V>> R flatCollect(Function<? super T, ? extends Iterable<V>> function, R target) - Specified by:
flatCollectin interfaceRichIterable<T>
-
collectIf
public <V> MutableCollection<V> collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function) - Specified by:
collectIfin interfaceMutableCollection<T>- Specified by:
collectIfin interfaceRichIterable<T>
-
collectIf
public <V,R extends Collection<V>> R collectIf(Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target) - Specified by:
collectIfin interfaceRichIterable<T>
-
selectAndRejectWith
public <P> Twin<MutableList<T>> selectAndRejectWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
selectAndRejectWithin interfaceMutableCollection<T>
-
partition
- Specified by:
partitionin interfaceMutableCollection<T>- Specified by:
partitionin interfaceRichIterable<T>
-
partitionWith
public <P> PartitionMutableCollection<T> partitionWith(Predicate2<? super T, ? super P> predicate, P parameter) - Specified by:
partitionWithin interfaceMutableCollection<T>- Specified by:
partitionWithin interfaceRichIterable<T>
-
size
public int size()- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceRichIterable<T>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceRichIterable<T>
-
contains
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceMutableCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
toArray
public <E> E[] toArray(E[] a) - Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceMutableCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
add
- Specified by:
addin interfaceCollection<T>
-
remove
- Specified by:
removein interfaceCollection<T>
-
containsAll
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceRichIterable<T>
-
containsAllIterable
- Specified by:
containsAllIterablein interfaceRichIterable<T>
-
containsAllArguments
- Specified by:
containsAllArgumentsin interfaceRichIterable<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>
-
addAllIterable
- Specified by:
addAllIterablein interfaceMutableCollection<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>
-
removeAllIterable
- Specified by:
removeAllIterablein interfaceMutableCollection<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>
-
retainAllIterable
- Specified by:
retainAllIterablein interfaceMutableCollection<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>
-
forEachWith
- Specified by:
forEachWithin interfaceInternalIterable<T>
-
selectWith
- Specified by:
selectWithin interfaceMutableCollection<T>- Specified by:
selectWithin interfaceRichIterable<T>
-
selectWith
public <P,R extends Collection<T>> R selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection) - Specified by:
selectWithin interfaceRichIterable<T>
-
rejectWith
- Specified by:
rejectWithin interfaceMutableCollection<T>- Specified by:
rejectWithin interfaceRichIterable<T>
-
rejectWith
public <P,R extends Collection<T>> R rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R targetCollection) - Specified by:
rejectWithin interfaceRichIterable<T>
-
collectWith
public <P,V> MutableCollection<V> collectWith(Function2<? super T, ? super P, ? extends V> function, P parameter) - Specified by:
collectWithin interfaceMutableCollection<T>- Specified by:
collectWithin interfaceRichIterable<T>
-
collectWith
public <P,A, R collectWithR extends Collection<A>> (Function2<? super T, ? super P, ? extends A> function, P parameter, R targetCollection) - Specified by:
collectWithin interfaceRichIterable<T>
-
injectIntoWith
public <IV,P> IV injectIntoWith(IV injectValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter) - Specified by:
injectIntoWithin interfaceMutableCollection<T>
-
into
- Specified by:
intoin interfaceRichIterable<T>
-
toList
- Specified by:
toListin interfaceRichIterable<T>
-
toSortedList
- Specified by:
toSortedListin interfaceRichIterable<T>
-
toSortedSet
- Specified by:
toSortedSetin interfaceRichIterable<T>
-
toSortedSet
- Specified by:
toSortedSetin interfaceRichIterable<T>
-
toSet
- Specified by:
toSetin interfaceRichIterable<T>
-
toBag
- Specified by:
toBagin interfaceRichIterable<T>
-
toSortedBag
- Specified by:
toSortedBagin interfaceRichIterable<T>
-
toSortedBag
- Specified by:
toSortedBagin interfaceRichIterable<T>
-
toMap
public <K,V> MutableMap<K,V> toMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) - Specified by:
toMapin interfaceRichIterable<T>
-
toMap
public <K,V, R toMapR extends Map<K, V>> (Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction, R target) - Specified by:
toMapin interfaceRichIterable<T>
-
toSortedMap
public <K,V> MutableSortedMap<K,V> toSortedMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) - Specified by:
toSortedMapin interfaceRichIterable<T>
-
toSortedMap
public <K,V> MutableSortedMap<K,V> toSortedMap(Comparator<? super K> comparator, Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) - Specified by:
toSortedMapin interfaceRichIterable<T>
-
toBiMap
public <K,V> MutableBiMap<K,V> toBiMap(Function<? super T, ? extends K> keyFunction, Function<? super T, ? extends V> valueFunction) - Specified by:
toBiMapin interfaceRichIterable<T>
-
asLazy
- Specified by:
asLazyin interfaceRichIterable<T>
-
countWith
- Specified by:
countWithin interfaceRichIterable<T>
-
anySatisfyWith
- Specified by:
anySatisfyWithin interfaceRichIterable<T>
-
allSatisfyWith
- Specified by:
allSatisfyWithin interfaceRichIterable<T>
-
noneSatisfyWith
- Specified by:
noneSatisfyWithin interfaceRichIterable<T>
-
toString
- Specified by:
toStringin interfaceRichIterable<T>- Overrides:
toStringin classObject
-
appendString
- Specified by:
appendStringin interfaceRichIterable<T>
-
groupBy
- Specified by:
groupByin interfaceMutableCollection<T>- Specified by:
groupByin interfaceRichIterable<T>
-
groupBy
public <V,R extends MutableMultimap<V, R groupByT>> (Function<? super T, ? extends V> function, R target) - Specified by:
groupByin interfaceRichIterable<T>
-
groupByEach
- Specified by:
groupByEachin interfaceMutableCollection<T>- Specified by:
groupByEachin interfaceRichIterable<T>
-
groupByEach
public <V,R extends MutableMultimap<V, R groupByEachT>> (Function<? super T, ? extends Iterable<V>> function, R target) - Specified by:
groupByEachin interfaceRichIterable<T>
-
groupByUniqueKey
- Specified by:
groupByUniqueKeyin interfaceMutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
groupByUniqueKey
public <V,R extends MutableMapIterable<V, R groupByUniqueKeyT>> (Function<? super T, ? extends V> function, R target) - Specified by:
groupByUniqueKeyin interfaceRichIterable<T>
-
zip
- Specified by:
zipin interfaceMutableCollection<T>- Specified by:
zipin interfaceRichIterable<T>
-
zip
- Specified by:
zipin interfaceRichIterable<T>
-
zipWithIndex
- Specified by:
zipWithIndexin interfaceMutableCollection<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>
-
zipWithIndex
- Specified by:
zipWithIndexin interfaceRichIterable<T>
-
chunk
- Specified by:
chunkin interfaceRichIterable<T>
-