Package org.eclipse.collections.impl.bag
Class AbstractBag<T>
java.lang.Object
org.eclipse.collections.impl.AbstractRichIterable<T>
org.eclipse.collections.impl.bag.AbstractBag<T>
- All Implemented Interfaces:
Iterable<T>,Collection<T>,Bag<T>,InternalIterable<T>,RichIterable<T>
- Direct Known Subclasses:
AbstractImmutableBagIterable,AbstractMutableBagIterable
public abstract class AbstractBag<T>
extends AbstractRichIterable<T>
implements Collection<T>, Bag<T>
- Since:
- 7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<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,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,V, R extends Collection<V>>
RcollectWith(Function2<? super T, ? super P, ? extends V> function, P parameter, R target) int<V,R extends Collection<V>>
RflatCollect(Function<? super T, ? extends Iterable<V>> function, R target) <R extends MutableBooleanCollection>
RflatCollectBoolean(Function<? super T, ? extends BooleanIterable> function, R target) <R extends MutableByteCollection>
RflatCollectByte(Function<? super T, ? extends ByteIterable> function, R target) <R extends MutableCharCollection>
RflatCollectChar(Function<? super T, ? extends CharIterable> function, R target) <R extends MutableDoubleCollection>
RflatCollectDouble(Function<? super T, ? extends DoubleIterable> function, R target) <R extends MutableFloatCollection>
RflatCollectFloat(Function<? super T, ? extends FloatIterable> function, R target) <R extends MutableIntCollection>
RflatCollectInt(Function<? super T, ? extends IntIterable> function, R target) <R extends MutableLongCollection>
RflatCollectLong(Function<? super T, ? extends LongIterable> function, R target) <R extends MutableShortCollection>
RflatCollectShort(Function<? super T, ? extends ShortIterable> function, R target) <V,R extends MutableMultimap<V, T>>
R<V,R extends MutableMultimap<V, T>>
RgroupByEach(Function<? super T, ? extends Iterable<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 injectedValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter) <R extends Collection<T>>
R<P,R extends Collection<T>>
RrejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target) <R extends Collection<T>>
R<P,R extends Collection<T>>
RselectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target) 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[] array) toBag()toList()toSet()toSortedBag(Comparator<? super T> comparator) toSortedList(Comparator<? super T> comparator) toSortedSet(Comparator<? super T> comparator) Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, asLazy, contains, containsAll, containsAllArguments, containsAllIterable, countByEach, countWith, detect, detectOptional, detectWith, detectWithIfNone, detectWithOptional, forEach, forEachWith, forEachWithIndex, groupByUniqueKey, into, isEmpty, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndexMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.collections.api.bag.Bag
aggregateBy, allSatisfyWithOccurrences, anySatisfyWithOccurrences, bottomOccurrences, collectWithOccurrences, collectWithOccurrences, detectWithOccurrences, distinctView, equals, forEachWithOccurrences, groupBy, groupByEach, hashCode, noneSatisfyWithOccurrences, occurrencesOf, partition, partitionWith, reduceBy, reduceInPlace, reduceInPlace, reject, rejectWith, select, selectByOccurrences, selectDuplicates, selectInstancesOf, selectUnique, selectWith, sizeDistinct, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, tap, toImmutable, toMapOfItemToCount, topOccurrences, zipWithIndexMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArrayMethods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith, forEachWithIndexMethods inherited from interface org.eclipse.collections.api.RichIterable
aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countBy, countByEach, countByEach, countByWith, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectWith, flatCollectWith, forEach, getAny, getFirst, getLast, getOnly, groupByAndCollect, groupByUniqueKey, groupByUniqueKey, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reduceBy, size, sumByDouble, sumByFloat, sumByInt, sumByLong, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toMap, toMap, toSortedBagBy, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zip, zipWithIndex
-
Constructor Details
-
AbstractBag
public AbstractBag()
-
-
Method Details
-
toArray
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
toArray
public <E> E[] toArray(E[] array) - Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>
-
select
- Specified by:
selectin interfaceRichIterable<T>- Overrides:
selectin classAbstractRichIterable<T>
-
selectWith
public <P,R extends Collection<T>> R selectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target) - Specified by:
selectWithin interfaceRichIterable<T>- Overrides:
selectWithin classAbstractRichIterable<T>
-
reject
- Specified by:
rejectin interfaceRichIterable<T>- Overrides:
rejectin classAbstractRichIterable<T>
-
rejectWith
public <P,R extends Collection<T>> R rejectWith(Predicate2<? super T, ? super P> predicate, P parameter, R target) - Specified by:
rejectWithin interfaceRichIterable<T>- Overrides:
rejectWithin classAbstractRichIterable<T>
-
count
- Specified by:
countin interfaceRichIterable<T>- Overrides:
countin classAbstractRichIterable<T>
-
collect
- Specified by:
collectin interfaceRichIterable<T>- Overrides:
collectin classAbstractRichIterable<T>
-
collectWith
public <P,V, R collectWithR extends Collection<V>> (Function2<? super T, ? super P, ? extends V> function, P parameter, R target) - Specified by:
collectWithin interfaceRichIterable<T>- Overrides:
collectWithin classAbstractRichIterable<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>- Overrides:
collectIfin classAbstractRichIterable<T>
-
flatCollect
public <V,R extends Collection<V>> R flatCollect(Function<? super T, ? extends Iterable<V>> function, R target) - Specified by:
flatCollectin interfaceRichIterable<T>- Overrides:
flatCollectin classAbstractRichIterable<T>
-
collectBoolean
public <R extends MutableBooleanCollection> R collectBoolean(BooleanFunction<? super T> booleanFunction, R target) - Specified by:
collectBooleanin interfaceRichIterable<T>
-
flatCollectBoolean
public <R extends MutableBooleanCollection> R flatCollectBoolean(Function<? super T, ? extends BooleanIterable> function, R target) - Specified by:
flatCollectBooleanin interfaceRichIterable<T>
-
collectByte
public <R extends MutableByteCollection> R collectByte(ByteFunction<? super T> byteFunction, R target) - Specified by:
collectBytein interfaceRichIterable<T>
-
flatCollectByte
public <R extends MutableByteCollection> R flatCollectByte(Function<? super T, ? extends ByteIterable> function, R target) - Specified by:
flatCollectBytein interfaceRichIterable<T>
-
collectChar
public <R extends MutableCharCollection> R collectChar(CharFunction<? super T> charFunction, R target) - Specified by:
collectCharin interfaceRichIterable<T>
-
flatCollectChar
public <R extends MutableCharCollection> R flatCollectChar(Function<? super T, ? extends CharIterable> function, R target) - Specified by:
flatCollectCharin interfaceRichIterable<T>
-
collectDouble
public <R extends MutableDoubleCollection> R collectDouble(DoubleFunction<? super T> doubleFunction, R target) - Specified by:
collectDoublein interfaceRichIterable<T>
-
flatCollectDouble
public <R extends MutableDoubleCollection> R flatCollectDouble(Function<? super T, ? extends DoubleIterable> function, R target) - Specified by:
flatCollectDoublein interfaceRichIterable<T>
-
collectFloat
public <R extends MutableFloatCollection> R collectFloat(FloatFunction<? super T> floatFunction, R target) - Specified by:
collectFloatin interfaceRichIterable<T>
-
flatCollectFloat
public <R extends MutableFloatCollection> R flatCollectFloat(Function<? super T, ? extends FloatIterable> function, R target) - Specified by:
flatCollectFloatin interfaceRichIterable<T>
-
collectInt
- Specified by:
collectIntin interfaceRichIterable<T>
-
flatCollectInt
public <R extends MutableIntCollection> R flatCollectInt(Function<? super T, ? extends IntIterable> function, R target) - Specified by:
flatCollectIntin interfaceRichIterable<T>
-
collectLong
public <R extends MutableLongCollection> R collectLong(LongFunction<? super T> longFunction, R target) - Specified by:
collectLongin interfaceRichIterable<T>
-
flatCollectLong
public <R extends MutableLongCollection> R flatCollectLong(Function<? super T, ? extends LongIterable> function, R target) - Specified by:
flatCollectLongin interfaceRichIterable<T>
-
collectShort
public <R extends MutableShortCollection> R collectShort(ShortFunction<? super T> shortFunction, R target) - Specified by:
collectShortin interfaceRichIterable<T>
-
flatCollectShort
public <R extends MutableShortCollection> R flatCollectShort(Function<? super T, ? extends ShortIterable> function, R target) - Specified by:
flatCollectShortin interfaceRichIterable<T>
-
groupBy
public <V,R extends MutableMultimap<V, R groupByT>> (Function<? super T, ? extends V> function, R target) - Specified by:
groupByin interfaceRichIterable<T>- Overrides:
groupByin classAbstractRichIterable<T>
-
groupByEach
public <V,R extends MutableMultimap<V, R groupByEachT>> (Function<? super T, ? extends Iterable<V>> function, R target) - Specified by:
groupByEachin interfaceRichIterable<T>- Overrides:
groupByEachin classAbstractRichIterable<T>
-
sumOfInt
- Specified by:
sumOfIntin interfaceRichIterable<T>- Overrides:
sumOfIntin classAbstractRichIterable<T>
-
sumOfFloat
- Specified by:
sumOfFloatin interfaceRichIterable<T>- Overrides:
sumOfFloatin classAbstractRichIterable<T>
-
sumOfLong
- Specified by:
sumOfLongin interfaceRichIterable<T>- Overrides:
sumOfLongin classAbstractRichIterable<T>
-
sumOfDouble
- Specified by:
sumOfDoublein interfaceRichIterable<T>- Overrides:
sumOfDoublein classAbstractRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<T>
-
injectInto
- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractRichIterable<T>
-
injectIntoWith
-
toStringOfItemToCount
- Specified by:
toStringOfItemToCountin interfaceBag<T>
-
toList
- Specified by:
toListin interfaceRichIterable<T>- Overrides:
toListin classAbstractRichIterable<T>
-
toSortedList
- Specified by:
toSortedListin interfaceRichIterable<T>
-
toSet
- Specified by:
toSetin interfaceRichIterable<T>- Overrides:
toSetin classAbstractRichIterable<T>
-
toSortedSet
- Specified by:
toSortedSetin interfaceRichIterable<T>- Overrides:
toSortedSetin classAbstractRichIterable<T>
-
toSortedSet
- Specified by:
toSortedSetin interfaceRichIterable<T>- Overrides:
toSortedSetin classAbstractRichIterable<T>
-
toBag
- Specified by:
toBagin interfaceRichIterable<T>- Overrides:
toBagin classAbstractRichIterable<T>
-
toSortedBag
- Specified by:
toSortedBagin interfaceRichIterable<T>- Overrides:
toSortedBagin classAbstractRichIterable<T>
-
toSortedBag
- Specified by:
toSortedBagin interfaceRichIterable<T>- Overrides:
toSortedBagin classAbstractRichIterable<T>
-