Class ImmutableHashBag<T>
- java.lang.Object
-
- org.eclipse.collections.impl.AbstractRichIterable<T>
-
- org.eclipse.collections.impl.bag.AbstractBag<T>
-
- org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable<T>
-
- org.eclipse.collections.impl.bag.immutable.AbstractImmutableBag<T>
-
- org.eclipse.collections.impl.bag.immutable.ImmutableHashBag<T>
-
- All Implemented Interfaces:
Serializable,Iterable<T>,Collection<T>,Bag<T>,ImmutableBag<T>,ImmutableBagIterable<T>,UnsortedBag<T>,ImmutableCollection<T>,InternalIterable<T>,RichIterable<T>
public class ImmutableHashBag<T> extends AbstractImmutableBag<T> implements Serializable
- Since:
- 1.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ImmutableHashBag()ImmutableHashBag(Iterable<? extends T> source)ImmutableHashBag(Bag<? extends T> source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanallSatisfy(Predicate<? super T> predicate)<P> booleanallSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)booleanallSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)booleananySatisfy(Predicate<? super T> predicate)<P> booleananySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)booleananySatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)voidappendString(Appendable appendable)voidappendString(Appendable appendable, String separator)voidappendString(Appendable appendable, String start, String separator, String end)LazyIterable<T>asLazy()<V> ImmutableBag<V>collect(Function<? super T,? extends V> function)<V,R extends Collection<V>>
Rcollect(Function<? super T,? extends V> function, R target)<V> ImmutableBag<V>collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)<V,R extends Collection<V>>
RcollectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function, R target)booleancontains(Object object)booleancontainsAllArguments(Object... elements)booleancontainsAllIterable(Iterable<?> source)intcount(Predicate<? super T> predicate)Tdetect(Predicate<? super T> predicate)TdetectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)Optional<T>detectOptional(Predicate<? super T> predicate)<P> TdetectWith(Predicate2<? super T,? super P> predicate, P parameter)TdetectWithOccurrences(ObjectIntPredicate<? super T> predicate)<P> Optional<T>detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)RichIterable<T>distinctView()voideach(Procedure<? super T> procedure)booleanequals(Object obj)<V> ImmutableBag<V>flatCollect(Function<? super T,? extends Iterable<V>> function)<V,R extends Collection<V>>
RflatCollect(Function<? super T,? extends Iterable<V>> function, R target)voidforEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)voidforEachWithOccurrences(ObjectIntProcedure<? super T> objectIntProcedure)TgetFirst()TgetLast()TgetOnly()<V> ImmutableBagMultimap<V,T>groupBy(Function<? super T,? extends V> function)<V,R extends MutableMultimap<V,T>>
RgroupBy(Function<? super T,? extends V> function, R target)<V> ImmutableBagMultimap<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> ImmutableMap<V,T>groupByUniqueKey(Function<? super T,? extends V> function)inthashCode()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)booleanisEmpty()Iterator<T>iterator()StringmakeString()StringmakeString(String separator)StringmakeString(String start, String separator, String end)Tmax()Tmax(Comparator<? super T> comparator)<V extends Comparable<? super V>>
TmaxBy(Function<? super T,? extends V> function)Tmin()Tmin(Comparator<? super T> comparator)<V extends Comparable<? super V>>
TminBy(Function<? super T,? extends V> function)static <T> ImmutableHashBag<T>newBag()static <T> ImmutableHashBag<T>newBag(Iterable<? extends T> source)static <T> ImmutableHashBag<T>newBagWith(Bag<? extends T> bag)static <T> ImmutableHashBag<T>newBagWith(T... elements)ImmutableBag<T>newWith(T element)ImmutableBag<T>newWithAll(Iterable<? extends T> elements)ImmutableBag<T>newWithout(T element)booleannoneSatisfy(Predicate<? super T> predicate)<P> booleannoneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)booleannoneSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)booleannotEmpty()intoccurrencesOf(Object item)PartitionImmutableBag<T>partition(Predicate<? super T> predicate)ImmutableBag<T>reject(Predicate<? super T> predicate)<R extends Collection<T>>
Rreject(Predicate<? super T> predicate, R target)ImmutableBag<T>select(Predicate<? super T> predicate)<R extends Collection<T>>
Rselect(Predicate<? super T> predicate, R target)ImmutableBag<T>selectByOccurrences(IntPredicate predicate)<S> ImmutableBag<S>selectInstancesOf(Class<S> clazz)intsize()intsizeDistinct()Object[]toArray()<T> T[]toArray(T[] a)MutableBag<T>toBag()MutableList<T>toList()<K,V>
MutableMap<K,V>toMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction)<K,V,R extends Map<K,V>>
RtoMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction, R target)MutableMap<T,Integer>toMapOfItemToCount()MutableSet<T>toSet()MutableSortedBag<T>toSortedBag()MutableSortedBag<T>toSortedBag(Comparator<? super T> comparator)MutableList<T>toSortedList()MutableList<T>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)MutableSortedSet<T>toSortedSet()MutableSortedSet<T>toSortedSet(Comparator<? super T> comparator)StringtoString()Returns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.<S> ImmutableBag<Pair<T,S>>zip(Iterable<S> that)Deprecated.in 6.0.<S,R extends Collection<Pair<T,S>>>
Rzip(Iterable<S> that, R target)ImmutableSet<Pair<T,Integer>>zipWithIndex()Deprecated.in 6.0.<R extends Collection<Pair<T,Integer>>>
RzipWithIndex(R target)-
Methods inherited from class org.eclipse.collections.impl.bag.immutable.AbstractImmutableBag
bottomOccurrences, chunk, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWith, collectWithOccurrences, countBy, countByEach, countByWith, newWithoutAll, partitionWith, rejectWith, selectWith, tap, toImmutable, topOccurrences
-
Methods inherited from class org.eclipse.collections.impl.bag.immutable.AbstractImmutableBagIterable
add, addAll, castToCollection, clear, parallelStream, remove, removeAll, retainAll, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong
-
Methods inherited from class org.eclipse.collections.impl.bag.AbstractBag
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWith, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, injectIntoWith, rejectWith, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toStringOfItemToCount
-
Methods inherited from class org.eclipse.collections.impl.AbstractRichIterable
containsAll, countWith, detectWithIfNone, forEach, forEachWith, groupByUniqueKey, into, toBiMap, toSortedBagBy, toSortedListBy, toSortedMapBy, toSortedSetBy
-
Methods inherited from interface org.eclipse.collections.api.bag.Bag
aggregateBy, collectWithOccurrences, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLong, toStringOfItemToCount
-
Methods inherited from interface java.util.Collection
containsAll, removeIf, toArray
-
Methods inherited from interface org.eclipse.collections.api.bag.ImmutableBag
flatCollectWith, selectDuplicates, selectUnique, toImmutableBag
-
Methods inherited from interface org.eclipse.collections.api.bag.ImmutableBagIterable
selectDuplicates, selectUnique
-
Methods inherited from interface org.eclipse.collections.api.collection.ImmutableCollection
aggregateBy, aggregateInPlaceBy, castToCollection, flatCollectWith, parallelStream, spliterator, stream, sumByDouble, sumByFloat, sumByInt, sumByLong
-
Methods inherited from interface org.eclipse.collections.api.InternalIterable
forEach, forEachWith
-
Methods inherited from interface org.eclipse.collections.api.RichIterable
collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, collectWith, containsAll, containsAny, containsAnyIterable, containsBy, containsNone, containsNoneIterable, countBy, countByEach, countByWith, countWith, detectWithIfNone, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, groupByAndCollect, groupByUniqueKey, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, makeString, maxByOptional, maxOptional, maxOptional, minByOptional, minOptional, minOptional, reduce, rejectWith, selectWith, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toBiMap, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toSortedBagBy, toSortedListBy, toSortedMapBy, toSortedSetBy
-
-
-
-
Method Detail
-
newBag
public static <T> ImmutableHashBag<T> newBag()
-
newBag
public static <T> ImmutableHashBag<T> newBag(Iterable<? extends T> source)
-
newBagWith
public static <T> ImmutableHashBag<T> newBagWith(T... elements)
-
newBagWith
public static <T> ImmutableHashBag<T> newBagWith(Bag<? extends T> bag)
-
newWith
public ImmutableBag<T> newWith(T element)
- Specified by:
newWithin interfaceImmutableBag<T>- Specified by:
newWithin interfaceImmutableCollection<T>
-
newWithout
public ImmutableBag<T> newWithout(T element)
- Specified by:
newWithoutin interfaceImmutableBag<T>- Specified by:
newWithoutin interfaceImmutableCollection<T>
-
newWithAll
public ImmutableBag<T> newWithAll(Iterable<? extends T> elements)
- Specified by:
newWithAllin interfaceImmutableBag<T>- Specified by:
newWithAllin interfaceImmutableCollection<T>
-
size
public int size()
- Specified by:
sizein interfaceCollection<T>- Specified by:
sizein interfaceRichIterable<T>
-
groupBy
public <V> ImmutableBagMultimap<V,T> groupBy(Function<? super T,? extends V> function)
- Specified by:
groupByin interfaceBag<T>- Specified by:
groupByin interfaceImmutableBag<T>- Specified by:
groupByin interfaceImmutableBagIterable<T>- Specified by:
groupByin interfaceImmutableCollection<T>- Specified by:
groupByin interfaceRichIterable<T>- Specified by:
groupByin interfaceUnsortedBag<T>
-
groupBy
public <V,R extends MutableMultimap<V,T>> R groupBy(Function<? super T,? extends V> function, R target)
- Specified by:
groupByin interfaceRichIterable<T>- Overrides:
groupByin classAbstractBag<T>
-
groupByEach
public <V> ImmutableBagMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
- Specified by:
groupByEachin interfaceBag<T>- Specified by:
groupByEachin interfaceImmutableBag<T>- Specified by:
groupByEachin interfaceImmutableBagIterable<T>- Specified by:
groupByEachin interfaceImmutableCollection<T>- Specified by:
groupByEachin interfaceRichIterable<T>- Specified by:
groupByEachin interfaceUnsortedBag<T>
-
groupByEach
public <V,R extends MutableMultimap<V,T>> R groupByEach(Function<? super T,? extends Iterable<V>> function, R target)
- Specified by:
groupByEachin interfaceRichIterable<T>- Overrides:
groupByEachin classAbstractBag<T>
-
groupByUniqueKey
public <V> ImmutableMap<V,T> groupByUniqueKey(Function<? super T,? extends V> function)
- Specified by:
groupByUniqueKeyin interfaceImmutableCollection<T>- Specified by:
groupByUniqueKeyin interfaceRichIterable<T>- Overrides:
groupByUniqueKeyin classAbstractImmutableBag<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<T>- Specified by:
isEmptyin interfaceRichIterable<T>- Overrides:
isEmptyin classAbstractRichIterable<T>
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmptyin interfaceRichIterable<T>
-
getFirst
public T getFirst()
- Specified by:
getFirstin interfaceRichIterable<T>
-
getLast
public T getLast()
- Specified by:
getLastin interfaceRichIterable<T>
-
getOnly
public T getOnly()
- Specified by:
getOnlyin interfaceRichIterable<T>
-
min
public T min(Comparator<? super T> comparator)
- Specified by:
minin interfaceRichIterable<T>- Overrides:
minin classAbstractRichIterable<T>
-
max
public T max(Comparator<? super T> comparator)
- Specified by:
maxin interfaceRichIterable<T>- Overrides:
maxin classAbstractRichIterable<T>
-
min
public T min()
- Specified by:
minin interfaceRichIterable<T>- Overrides:
minin classAbstractRichIterable<T>
-
max
public T max()
- Specified by:
maxin interfaceRichIterable<T>- Overrides:
maxin classAbstractRichIterable<T>
-
minBy
public <V extends Comparable<? super V>> T minBy(Function<? super T,? extends V> function)
- Specified by:
minByin interfaceRichIterable<T>- Overrides:
minByin classAbstractRichIterable<T>
-
maxBy
public <V extends Comparable<? super V>> T maxBy(Function<? super T,? extends V> function)
- Specified by:
maxByin interfaceRichIterable<T>- Overrides:
maxByin classAbstractRichIterable<T>
-
contains
public boolean contains(Object object)
- Specified by:
containsin interfaceCollection<T>- Specified by:
containsin interfaceRichIterable<T>- Overrides:
containsin classAbstractRichIterable<T>
-
containsAllIterable
public boolean containsAllIterable(Iterable<?> source)
- Specified by:
containsAllIterablein interfaceRichIterable<T>- Overrides:
containsAllIterablein classAbstractRichIterable<T>
-
containsAllArguments
public boolean containsAllArguments(Object... elements)
- Specified by:
containsAllArgumentsin interfaceRichIterable<T>- Overrides:
containsAllArgumentsin classAbstractRichIterable<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>- Overrides:
toMapin classAbstractRichIterable<T>
-
toMap
public <K,V,R extends Map<K,V>> R toMap(Function<? super T,? extends K> keyFunction, Function<? super T,? extends V> valueFunction, R target)
- Specified by:
toMapin interfaceRichIterable<T>
-
each
public void each(Procedure<? super T> procedure)
- Specified by:
eachin interfaceRichIterable<T>
-
forEachWithIndex
public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithIndexin interfaceInternalIterable<T>- Overrides:
forEachWithIndexin classAbstractRichIterable<T>
-
selectInstancesOf
public <S> ImmutableBag<S> selectInstancesOf(Class<S> clazz)
- Specified by:
selectInstancesOfin interfaceBag<T>- Specified by:
selectInstancesOfin interfaceImmutableBag<T>- Specified by:
selectInstancesOfin interfaceImmutableBagIterable<T>- Specified by:
selectInstancesOfin interfaceImmutableCollection<T>- Specified by:
selectInstancesOfin interfaceRichIterable<T>- Specified by:
selectInstancesOfin interfaceUnsortedBag<T>
-
selectByOccurrences
public ImmutableBag<T> selectByOccurrences(IntPredicate predicate)
- Specified by:
selectByOccurrencesin interfaceBag<T>- Specified by:
selectByOccurrencesin interfaceImmutableBag<T>- Specified by:
selectByOccurrencesin interfaceImmutableBagIterable<T>- Specified by:
selectByOccurrencesin interfaceUnsortedBag<T>
-
anySatisfyWithOccurrences
public boolean anySatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
- Specified by:
anySatisfyWithOccurrencesin interfaceBag<T>
-
allSatisfyWithOccurrences
public boolean allSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
- Specified by:
allSatisfyWithOccurrencesin interfaceBag<T>
-
noneSatisfyWithOccurrences
public boolean noneSatisfyWithOccurrences(ObjectIntPredicate<? super T> predicate)
- Specified by:
noneSatisfyWithOccurrencesin interfaceBag<T>
-
detectWithOccurrences
public T detectWithOccurrences(ObjectIntPredicate<? super T> predicate)
- Specified by:
detectWithOccurrencesin interfaceBag<T>
-
forEachWithOccurrences
public void forEachWithOccurrences(ObjectIntProcedure<? super T> objectIntProcedure)
- Specified by:
forEachWithOccurrencesin interfaceBag<T>
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceBag<T>
-
occurrencesOf
public int occurrencesOf(Object item)
- Specified by:
occurrencesOfin interfaceBag<T>
-
toList
public MutableList<T> toList()
- Specified by:
toListin interfaceRichIterable<T>- Overrides:
toListin classAbstractBag<T>
-
toSortedList
public MutableList<T> toSortedList()
- Specified by:
toSortedListin interfaceRichIterable<T>
-
toSortedList
public MutableList<T> toSortedList(Comparator<? super T> comparator)
- Specified by:
toSortedListin interfaceRichIterable<T>- Overrides:
toSortedListin classAbstractBag<T>
-
toSortedSet
public MutableSortedSet<T> toSortedSet()
- Specified by:
toSortedSetin interfaceRichIterable<T>- Overrides:
toSortedSetin classAbstractBag<T>
-
toSortedSet
public MutableSortedSet<T> toSortedSet(Comparator<? super T> comparator)
- Specified by:
toSortedSetin interfaceRichIterable<T>- Overrides:
toSortedSetin classAbstractBag<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>- Overrides:
toSortedMapin classAbstractRichIterable<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>- Overrides:
toSortedMapin classAbstractRichIterable<T>
-
select
public ImmutableBag<T> select(Predicate<? super T> predicate)
- Specified by:
selectin interfaceBag<T>- Specified by:
selectin interfaceImmutableBag<T>- Specified by:
selectin interfaceImmutableBagIterable<T>- Specified by:
selectin interfaceImmutableCollection<T>- Specified by:
selectin interfaceRichIterable<T>- Specified by:
selectin interfaceUnsortedBag<T>
-
select
public <R extends Collection<T>> R select(Predicate<? super T> predicate, R target)
- Specified by:
selectin interfaceRichIterable<T>- Overrides:
selectin classAbstractBag<T>
-
reject
public ImmutableBag<T> reject(Predicate<? super T> predicate)
- Specified by:
rejectin interfaceBag<T>- Specified by:
rejectin interfaceImmutableBag<T>- Specified by:
rejectin interfaceImmutableBagIterable<T>- Specified by:
rejectin interfaceImmutableCollection<T>- Specified by:
rejectin interfaceRichIterable<T>- Specified by:
rejectin interfaceUnsortedBag<T>
-
reject
public <R extends Collection<T>> R reject(Predicate<? super T> predicate, R target)
- Specified by:
rejectin interfaceRichIterable<T>- Overrides:
rejectin classAbstractBag<T>
-
partition
public PartitionImmutableBag<T> partition(Predicate<? super T> predicate)
- Specified by:
partitionin interfaceBag<T>- Specified by:
partitionin interfaceImmutableBag<T>- Specified by:
partitionin interfaceImmutableBagIterable<T>- Specified by:
partitionin interfaceImmutableCollection<T>- Specified by:
partitionin interfaceRichIterable<T>- Specified by:
partitionin interfaceUnsortedBag<T>- Overrides:
partitionin classAbstractImmutableBag<T>
-
collect
public <V> ImmutableBag<V> collect(Function<? super T,? extends V> function)
- Specified by:
collectin interfaceImmutableBag<T>- Specified by:
collectin interfaceImmutableCollection<T>- Specified by:
collectin interfaceRichIterable<T>- Specified by:
collectin interfaceUnsortedBag<T>
-
collect
public <V,R extends Collection<V>> R collect(Function<? super T,? extends V> function, R target)
- Specified by:
collectin interfaceRichIterable<T>- Overrides:
collectin classAbstractBag<T>
-
collectIf
public <V> ImmutableBag<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
- Specified by:
collectIfin interfaceImmutableBag<T>- Specified by:
collectIfin interfaceImmutableCollection<T>- Specified by:
collectIfin interfaceRichIterable<T>- Specified by:
collectIfin interfaceUnsortedBag<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 classAbstractBag<T>
-
flatCollect
public <V> ImmutableBag<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
- Specified by:
flatCollectin interfaceImmutableBag<T>- Specified by:
flatCollectin interfaceImmutableCollection<T>- Specified by:
flatCollectin interfaceRichIterable<T>- Specified by:
flatCollectin interfaceUnsortedBag<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 classAbstractBag<T>
-
detect
public T detect(Predicate<? super T> predicate)
- Specified by:
detectin interfaceRichIterable<T>- Overrides:
detectin classAbstractRichIterable<T>
-
detectWith
public <P> T detectWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWithin interfaceRichIterable<T>- Overrides:
detectWithin classAbstractRichIterable<T>
-
detectOptional
public Optional<T> detectOptional(Predicate<? super T> predicate)
- Specified by:
detectOptionalin interfaceRichIterable<T>- Overrides:
detectOptionalin classAbstractRichIterable<T>
-
detectWithOptional
public <P> Optional<T> detectWithOptional(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
detectWithOptionalin interfaceRichIterable<T>- Overrides:
detectWithOptionalin classAbstractRichIterable<T>
-
detectIfNone
public T detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
- Specified by:
detectIfNonein interfaceRichIterable<T>
-
count
public int count(Predicate<? super T> predicate)
- Specified by:
countin interfaceRichIterable<T>- Overrides:
countin classAbstractBag<T>
-
anySatisfy
public boolean anySatisfy(Predicate<? super T> predicate)
- Specified by:
anySatisfyin interfaceRichIterable<T>- Overrides:
anySatisfyin classAbstractRichIterable<T>
-
anySatisfyWith
public <P> boolean anySatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
anySatisfyWithin interfaceRichIterable<T>- Overrides:
anySatisfyWithin classAbstractRichIterable<T>
-
allSatisfy
public boolean allSatisfy(Predicate<? super T> predicate)
- Specified by:
allSatisfyin interfaceRichIterable<T>- Overrides:
allSatisfyin classAbstractRichIterable<T>
-
allSatisfyWith
public <P> boolean allSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
allSatisfyWithin interfaceRichIterable<T>- Overrides:
allSatisfyWithin classAbstractRichIterable<T>
-
noneSatisfy
public boolean noneSatisfy(Predicate<? super T> predicate)
- Specified by:
noneSatisfyin interfaceRichIterable<T>- Overrides:
noneSatisfyin classAbstractRichIterable<T>
-
noneSatisfyWith
public <P> boolean noneSatisfyWith(Predicate2<? super T,? super P> predicate, P parameter)
- Specified by:
noneSatisfyWithin interfaceRichIterable<T>- Overrides:
noneSatisfyWithin classAbstractRichIterable<T>
-
injectInto
public <IV> IV injectInto(IV injectedValue, Function2<? super IV,? super T,? extends IV> function)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractBag<T>
-
injectInto
public int injectInto(int injectedValue, IntObjectToIntFunction<? super T> function)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractBag<T>
-
injectInto
public long injectInto(long injectedValue, LongObjectToLongFunction<? super T> function)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractBag<T>
-
injectInto
public double injectInto(double injectedValue, DoubleObjectToDoubleFunction<? super T> function)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractBag<T>
-
injectInto
public float injectInto(float injectedValue, FloatObjectToFloatFunction<? super T> function)- Specified by:
injectIntoin interfaceRichIterable<T>- Overrides:
injectIntoin classAbstractBag<T>
-
equals
public boolean equals(Object obj)
-
hashCode
public int hashCode()
-
toMapOfItemToCount
public MutableMap<T,Integer> toMapOfItemToCount()
- Specified by:
toMapOfItemToCountin interfaceBag<T>- Specified by:
toMapOfItemToCountin interfaceImmutableBagIterable<T>
-
toSet
public MutableSet<T> toSet()
- Specified by:
toSetin interfaceRichIterable<T>- Overrides:
toSetin classAbstractBag<T>
-
toBag
public MutableBag<T> toBag()
- Specified by:
toBagin interfaceRichIterable<T>- Overrides:
toBagin classAbstractBag<T>
-
toSortedBag
public MutableSortedBag<T> toSortedBag()
- Specified by:
toSortedBagin interfaceRichIterable<T>- Overrides:
toSortedBagin classAbstractBag<T>
-
toSortedBag
public MutableSortedBag<T> toSortedBag(Comparator<? super T> comparator)
- Specified by:
toSortedBagin interfaceRichIterable<T>- Overrides:
toSortedBagin classAbstractBag<T>
-
asLazy
public LazyIterable<T> asLazy()
- Specified by:
asLazyin interfaceRichIterable<T>- Overrides:
asLazyin classAbstractRichIterable<T>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<T>- Specified by:
toArrayin interfaceRichIterable<T>- Overrides:
toArrayin classAbstractRichIterable<T>
-
toString
public String toString()
Description copied from class:AbstractRichIterableReturns a string with the elements of the iterable separated by commas with spaces and enclosed in square brackets.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());- Specified by:
toStringin interfaceRichIterable<T>- Overrides:
toStringin classAbstractRichIterable<T>- Returns:
- a string representation of this collection.
- See Also:
AbstractCollection.toString()
-
makeString
public String makeString()
- Specified by:
makeStringin interfaceRichIterable<T>
-
makeString
public String makeString(String separator)
- Specified by:
makeStringin interfaceRichIterable<T>
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeStringin interfaceRichIterable<T>
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendStringin interfaceRichIterable<T>
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendStringin interfaceRichIterable<T>- Overrides:
appendStringin classAbstractRichIterable<T>
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendStringin interfaceRichIterable<T>- Overrides:
appendStringin classAbstractRichIterable<T>
-
zip
@Deprecated public <S> ImmutableBag<Pair<T,S>> zip(Iterable<S> that)
Deprecated.in 6.0. UseOrderedIterable.zip(Iterable)instead.- Specified by:
zipin interfaceImmutableBag<T>- Specified by:
zipin interfaceImmutableCollection<T>- Specified by:
zipin interfaceRichIterable<T>- Specified by:
zipin interfaceUnsortedBag<T>
-
zip
public <S,R extends Collection<Pair<T,S>>> R zip(Iterable<S> that, R target)
- Specified by:
zipin interfaceRichIterable<T>- Overrides:
zipin classAbstractRichIterable<T>
-
zipWithIndex
@Deprecated public ImmutableSet<Pair<T,Integer>> zipWithIndex()
Deprecated.in 6.0. UseOrderedIterable.zipWithIndex()instead.- Specified by:
zipWithIndexin interfaceBag<T>- Specified by:
zipWithIndexin interfaceImmutableBag<T>- Specified by:
zipWithIndexin interfaceImmutableBagIterable<T>- Specified by:
zipWithIndexin interfaceImmutableCollection<T>- Specified by:
zipWithIndexin interfaceRichIterable<T>- Specified by:
zipWithIndexin interfaceUnsortedBag<T>
-
zipWithIndex
public <R extends Collection<Pair<T,Integer>>> R zipWithIndex(R target)
- Specified by:
zipWithIndexin interfaceRichIterable<T>- Overrides:
zipWithIndexin classAbstractRichIterable<T>
-
distinctView
public RichIterable<T> distinctView()
- Specified by:
distinctViewin interfaceBag<T>
-
-