public class ImmutableArrayBag<T> extends AbstractImmutableBag<T> implements Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(Predicate<? super T> predicate) |
<P> boolean |
allSatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
allSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) |
boolean |
anySatisfy(Predicate<? super T> predicate) |
<P> boolean |
anySatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
anySatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) |
<V> ImmutableBag<V> |
collect(Function<? super T,? extends V> function) |
<V> ImmutableBag<V> |
collectIf(Predicate<? super T> predicate,
Function<? super T,? extends V> function) |
static <T> ImmutableArrayBag<T> |
copyFrom(Bag<? extends T> bag) |
T |
detect(Predicate<? super T> predicate) |
Optional<T> |
detectOptional(Predicate<? super T> predicate) |
<P> T |
detectWith(Predicate2<? super T,? super P> predicate,
P parameter) |
T |
detectWithOccurrences(ObjectIntPredicate<? super T> predicate) |
<P> Optional<T> |
detectWithOptional(Predicate2<? super T,? super P> predicate,
P parameter) |
RichIterable<T> |
distinctView() |
void |
each(Procedure<? super T> procedure) |
boolean |
equals(Object other) |
<V> ImmutableBag<V> |
flatCollect(Function<? super T,? extends Iterable<V>> function) |
void |
forEachWithOccurrences(ObjectIntProcedure<? super T> objectIntProcedure) |
T |
getFirst() |
T |
getLast() |
T |
getOnly() |
<V> ImmutableBagMultimap<V,T> |
groupBy(Function<? super T,? extends V> function) |
<V> ImmutableBagMultimap<V,T> |
groupByEach(Function<? super T,? extends Iterable<V>> function) |
int |
hashCode() |
Iterator<T> |
iterator() |
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) |
static <T> ImmutableArrayBag<T> |
newBagWith(T... elements) |
ImmutableBag<T> |
newWith(T element) |
ImmutableBag<T> |
newWithAll(Iterable<? extends T> elements) |
ImmutableBag<T> |
newWithout(T element) |
boolean |
noneSatisfy(Predicate<? super T> predicate) |
<P> boolean |
noneSatisfyWith(Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
noneSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate) |
int |
occurrencesOf(Object item) |
ImmutableBag<T> |
reject(Predicate<? super T> predicate) |
ImmutableBag<T> |
select(Predicate<? super T> predicate) |
ImmutableBag<T> |
selectByOccurrences(IntPredicate predicate) |
<S> ImmutableBag<S> |
selectInstancesOf(Class<S> clazz) |
int |
size() |
int |
sizeDistinct() |
MutableMap<T,Integer> |
toMapOfItemToCount() |
<S> ImmutableBag<Pair<T,S>> |
zip(Iterable<S> that)
Deprecated.
in 6.0. Use
OrderedIterable.zip(Iterable) instead. |
ImmutableSet<Pair<T,Integer>> |
zipWithIndex()
Deprecated.
in 6.0. Use
OrderedIterable.zipWithIndex() instead. |
bottomOccurrences, chunk, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWith, collectWithOccurrences, countBy, countByEach, countByWith, groupByUniqueKey, newWithoutAll, partition, partitionWith, rejectWith, selectWith, tap, toImmutable, topOccurrencesadd, addAll, castToCollection, clear, parallelStream, remove, removeAll, retainAll, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLongcollect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, count, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, groupBy, groupByEach, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoWith, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBag, toList, toSet, toSortedBag, toSortedBag, toSortedList, toSortedSet, toSortedSet, toStringOfItemToCountappendString, appendString, asLazy, contains, containsAll, containsAllArguments, containsAllIterable, countWith, detectWithIfNone, forEach, forEachWith, forEachWithIndex, groupByUniqueKey, into, isEmpty, toArray, toArray, toBiMap, toMap, toSortedBagBy, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSetBy, toString, zip, zipWithIndexflatCollectWith, selectDuplicates, selectUnique, toImmutableBagaggregateBy, collectWithOccurrences, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toStringOfItemToCountaggregateBy, aggregateInPlaceBy, castToCollection, parallelStream, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLongappendString, appendString, appendString, asLazy, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detectIfNone, detectWithIfNone, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, notEmpty, reduce, reject, rejectWith, select, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toString, zip, zipWithIndexforEach, forEachWith, forEachWithIndexcontains, containsAll, isEmpty, removeIf, toArray, toArraypublic static <T> ImmutableArrayBag<T> newBagWith(T... elements)
public static <T> ImmutableArrayBag<T> copyFrom(Bag<? extends T> bag)
public void forEachWithOccurrences(ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithOccurrences in interface Bag<T>public boolean anySatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
anySatisfyWithOccurrences in interface Bag<T>public boolean allSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
allSatisfyWithOccurrences in interface Bag<T>public boolean noneSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
noneSatisfyWithOccurrences in interface Bag<T>public T detectWithOccurrences(ObjectIntPredicate<? super T> predicate)
detectWithOccurrences in interface Bag<T>public int sizeDistinct()
sizeDistinct in interface Bag<T>public int size()
size in interface Collection<T>size in interface RichIterable<T>public int occurrencesOf(Object item)
occurrencesOf in interface Bag<T>public ImmutableBag<T> newWith(T element)
newWith in interface ImmutableBag<T>newWith in interface ImmutableCollection<T>public ImmutableBag<T> newWithout(T element)
newWithout in interface ImmutableBag<T>newWithout in interface ImmutableCollection<T>public MutableMap<T,Integer> toMapOfItemToCount()
toMapOfItemToCount in interface Bag<T>toMapOfItemToCount in interface ImmutableBagIterable<T>public ImmutableBag<T> newWithAll(Iterable<? extends T> elements)
newWithAll in interface ImmutableBag<T>newWithAll in interface ImmutableCollection<T>public ImmutableBag<T> selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface Bag<T>selectByOccurrences in interface ImmutableBag<T>selectByOccurrences in interface ImmutableBagIterable<T>selectByOccurrences in interface UnsortedBag<T>public <S> ImmutableBag<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface Bag<T>selectInstancesOf in interface ImmutableBag<T>selectInstancesOf in interface ImmutableBagIterable<T>selectInstancesOf in interface UnsortedBag<T>selectInstancesOf in interface ImmutableCollection<T>selectInstancesOf in interface RichIterable<T>public <V> ImmutableBagMultimap<V,T> groupBy(Function<? super T,? extends V> function)
groupBy in interface Bag<T>groupBy in interface ImmutableBag<T>groupBy in interface ImmutableBagIterable<T>groupBy in interface UnsortedBag<T>groupBy in interface ImmutableCollection<T>groupBy in interface RichIterable<T>public <V> ImmutableBagMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
groupByEach in interface Bag<T>groupByEach in interface ImmutableBag<T>groupByEach in interface ImmutableBagIterable<T>groupByEach in interface UnsortedBag<T>groupByEach in interface ImmutableCollection<T>groupByEach in interface RichIterable<T>public T getFirst()
getFirst in interface RichIterable<T>public T getLast()
getLast in interface RichIterable<T>public T getOnly()
getOnly in interface RichIterable<T>public ImmutableBag<T> select(Predicate<? super T> predicate)
select in interface Bag<T>select in interface ImmutableBag<T>select in interface ImmutableBagIterable<T>select in interface UnsortedBag<T>select in interface ImmutableCollection<T>select in interface RichIterable<T>public ImmutableBag<T> reject(Predicate<? super T> predicate)
reject in interface Bag<T>reject in interface ImmutableBag<T>reject in interface ImmutableBagIterable<T>reject in interface UnsortedBag<T>reject in interface ImmutableCollection<T>reject in interface RichIterable<T>public <V> ImmutableBag<V> collect(Function<? super T,? extends V> function)
collect in interface ImmutableBag<T>collect in interface UnsortedBag<T>collect in interface ImmutableCollection<T>collect in interface RichIterable<T>public <V> ImmutableBag<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
collectIf in interface ImmutableBag<T>collectIf in interface UnsortedBag<T>collectIf in interface ImmutableCollection<T>collectIf in interface RichIterable<T>public <V> ImmutableBag<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
flatCollect in interface ImmutableBag<T>flatCollect in interface UnsortedBag<T>flatCollect in interface ImmutableCollection<T>flatCollect in interface RichIterable<T>public boolean equals(Object other)
public int hashCode()
public void each(Procedure<? super T> procedure)
each in interface RichIterable<T>public boolean anySatisfy(Predicate<? super T> predicate)
anySatisfy in interface RichIterable<T>anySatisfy in class AbstractRichIterable<T>public <P> boolean anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
anySatisfyWith in interface RichIterable<T>anySatisfyWith in class AbstractRichIterable<T>public boolean allSatisfy(Predicate<? super T> predicate)
allSatisfy in interface RichIterable<T>allSatisfy in class AbstractRichIterable<T>public <P> boolean allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
allSatisfyWith in interface RichIterable<T>allSatisfyWith in class AbstractRichIterable<T>public boolean noneSatisfy(Predicate<? super T> predicate)
noneSatisfy in interface RichIterable<T>noneSatisfy in class AbstractRichIterable<T>public <P> boolean noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
noneSatisfyWith in interface RichIterable<T>noneSatisfyWith in class AbstractRichIterable<T>public T detect(Predicate<? super T> predicate)
detect in interface RichIterable<T>detect in class AbstractRichIterable<T>public <P> T detectWith(Predicate2<? super T,? super P> predicate, P parameter)
detectWith in interface RichIterable<T>detectWith in class AbstractRichIterable<T>public Optional<T> detectOptional(Predicate<? super T> predicate)
detectOptional in interface RichIterable<T>detectOptional in class AbstractRichIterable<T>public <P> Optional<T> detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
detectWithOptional in interface RichIterable<T>detectWithOptional in class AbstractRichIterable<T>public T min(Comparator<? super T> comparator)
min in interface RichIterable<T>min in class AbstractRichIterable<T>public T max(Comparator<? super T> comparator)
max in interface RichIterable<T>max in class AbstractRichIterable<T>public T min()
min in interface RichIterable<T>min in class AbstractRichIterable<T>public T max()
max in interface RichIterable<T>max in class AbstractRichIterable<T>public <V extends Comparable<? super V>> T minBy(Function<? super T,? extends V> function)
minBy in interface RichIterable<T>minBy in class AbstractRichIterable<T>public <V extends Comparable<? super V>> T maxBy(Function<? super T,? extends V> function)
maxBy in interface RichIterable<T>maxBy in class AbstractRichIterable<T>@Deprecated public <S> ImmutableBag<Pair<T,S>> zip(Iterable<S> that)
OrderedIterable.zip(Iterable) instead.zip in interface ImmutableBag<T>zip in interface UnsortedBag<T>zip in interface ImmutableCollection<T>zip in interface RichIterable<T>@Deprecated public ImmutableSet<Pair<T,Integer>> zipWithIndex()
OrderedIterable.zipWithIndex() instead.zipWithIndex in interface Bag<T>zipWithIndex in interface ImmutableBag<T>zipWithIndex in interface ImmutableBagIterable<T>zipWithIndex in interface UnsortedBag<T>zipWithIndex in interface ImmutableCollection<T>zipWithIndex in interface RichIterable<T>public RichIterable<T> distinctView()
distinctView in interface Bag<T>Copyright © 2004–2022. All rights reserved.