public class SynchronizedSortedBag<T> extends AbstractSynchronizedMutableCollection<T> implements MutableSortedBag<T>, Serializable
MutableSortedBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
standard JDK iterator or JDK 5 for loop, as per Collections.synchronizedCollection(Collection).MutableSortedBag.asSynchronized(),
Serialized Formadd, addAll, addAllIterable, aggregateBy, aggregateInPlaceBy, clear, countBy, countByEach, countByWith, groupByUniqueKey, injectIntoWith, remove, removeAll, removeAllIterable, removeIf, removeIfWith, retainAll, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongallSatisfy, 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, containsNone, containsNoneIterable, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, equals, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, forEachWith, forEachWithIndex, getFirst, getLast, getOnly, groupBy, groupByEach, groupByUniqueKey, hashCode, injectInto, injectInto, injectInto, injectInto, injectInto, into, isEmpty, iterator, makeString, makeString, makeString, makeString, max, max, maxBy, maxByOptional, maxOptional, maxOptional, min, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableList, toImmutableSet, toImmutableSortedBag, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toString, zip, zipWithIndexcountBy, countByEach, countByWith, flatCollectWith, selectDuplicates, toImmutableSortedBag, with, withAll, without, withoutAllforEachWithIndex, getFirst, getLast, rejectWithIndex, selectWithIndex, zip, zipWithIndexaggregateBy, 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, count, countBy, countByEach, countByWith, countWith, detect, detectIfNone, detectOptional, detectWith, detectWithIfNone, detectWithOptional, each, flatCollect, flatCollectBoolean, flatCollectByte, flatCollectChar, flatCollectDouble, flatCollectFloat, flatCollectInt, flatCollectLong, flatCollectShort, flatCollectWith, forEach, getAny, getOnly, groupBy, groupByAndCollect, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, into, isEmpty, makeString, makeString, makeString, makeString, max, maxBy, maxByOptional, maxOptional, maxOptional, min, minBy, minByOptional, minOptional, minOptional, noneSatisfy, noneSatisfyWith, notEmpty, reduce, reject, rejectWith, select, selectWith, size, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toBiMap, toImmutableBag, toImmutableBiMap, toImmutableList, toImmutableMap, toImmutableSet, toImmutableSortedBag, toImmutableSortedBagBy, toImmutableSortedList, toImmutableSortedList, toImmutableSortedListBy, toImmutableSortedSet, toImmutableSortedSet, toImmutableSortedSetBy, toList, toMap, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedMapBy, toSortedSet, toSortedSet, toSortedSetBy, toStringforEach, forEachWithiterator, spliteratoraggregateBy, equals, hashCode, reduceInPlace, reduceInPlace, summarizeDouble, summarizeFloat, summarizeInt, summarizeLongaddAllIterable, aggregateBy, aggregateInPlaceBy, groupByUniqueKey, injectIntoWith, removeAllIterable, removeIf, removeIfWith, retainAllIterable, selectAndRejectWith, sumByDouble, sumByFloat, sumByInt, sumByLongadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArraypublic static <E> SynchronizedSortedBag<E> of(MutableSortedBag<E> bag)
public static <E> MutableSortedBag<E> of(MutableSortedBag<E> bag, Object lock)
public MutableSortedBag<T> newEmpty()
newEmpty in interface MutableSortedBag<T>newEmpty in interface MutableCollection<T>public MutableSortedBag<T> clone()
clone in interface MutableSortedBag<T>clone in class Objectpublic Comparator<? super T> comparator()
comparator in interface SortedBag<T>comparator in interface SortedIterable<T>public int compareTo(SortedBag<T> o)
compareTo in interface Comparable<SortedBag<T>>public int addOccurrences(T item, int occurrences)
addOccurrences in interface MutableBagIterable<T>public boolean removeOccurrences(Object item, int occurrences)
removeOccurrences in interface MutableBagIterable<T>public boolean setOccurrences(T item, int occurrences)
setOccurrences in interface MutableBagIterable<T>public MutableList<ObjectIntPair<T>> topOccurrences(int count)
topOccurrences in interface Bag<T>topOccurrences in interface MutableBagIterable<T>public MutableSortedBag<T> selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface Bag<T>selectByOccurrences in interface MutableBagIterable<T>selectByOccurrences in interface MutableSortedBag<T>selectByOccurrences in interface SortedBag<T>public MutableList<ObjectIntPair<T>> bottomOccurrences(int count)
bottomOccurrences in interface Bag<T>bottomOccurrences in interface MutableBagIterable<T>public MutableSortedMap<T,Integer> toMapOfItemToCount()
toMapOfItemToCount in interface Bag<T>toMapOfItemToCount in interface MutableBagIterable<T>toMapOfItemToCount in interface MutableSortedBag<T>toMapOfItemToCount in interface SortedBag<T>public void forEachWithOccurrences(ObjectIntProcedure<? super T> procedure)
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 <V> MutableList<V> collectWithOccurrences(ObjectIntToObjectFunction<? super T,? extends V> function)
collectWithOccurrences in interface Bag<T>collectWithOccurrences in interface MutableBagIterable<T>collectWithOccurrences in interface MutableSortedBag<T>collectWithOccurrences in interface SortedBag<T>public <V,R extends Collection<V>> R collectWithOccurrences(ObjectIntToObjectFunction<? super T,? extends V> function, R target)
collectWithOccurrences in interface Bag<T>public int occurrencesOf(Object item)
occurrencesOf in interface Bag<T>public int sizeDistinct()
sizeDistinct in interface Bag<T>public String toStringOfItemToCount()
toStringOfItemToCount in interface Bag<T>public int indexOf(Object object)
indexOf in interface OrderedIterable<T>public MutableStack<T> toStack()
toStack in interface OrderedIterable<T>public PartitionMutableSortedBag<T> partitionWhile(Predicate<? super T> predicate)
partitionWhile in interface MutableSortedBag<T>partitionWhile in interface SortedBag<T>partitionWhile in interface OrderedIterable<T>partitionWhile in interface ReversibleIterable<T>partitionWhile in interface SortedIterable<T>public MutableSortedSet<T> distinct()
distinct in interface MutableSortedBag<T>distinct in interface SortedBag<T>distinct in interface OrderedIterable<T>distinct in interface ReversibleIterable<T>distinct in interface SortedIterable<T>public MutableSortedBag<T> takeWhile(Predicate<? super T> predicate)
takeWhile in interface MutableSortedBag<T>takeWhile in interface SortedBag<T>takeWhile in interface OrderedIterable<T>takeWhile in interface ReversibleIterable<T>takeWhile in interface SortedIterable<T>public MutableSortedBag<T> dropWhile(Predicate<? super T> predicate)
dropWhile in interface MutableSortedBag<T>dropWhile in interface SortedBag<T>dropWhile in interface OrderedIterable<T>dropWhile in interface ReversibleIterable<T>dropWhile in interface SortedIterable<T>public <S> boolean corresponds(OrderedIterable<S> other, Predicate2<? super T,? super S> predicate)
corresponds in interface OrderedIterable<T>public void forEach(int startIndex,
int endIndex,
Procedure<? super T> procedure)
forEach in interface OrderedIterable<T>public void forEachWithIndex(int fromIndex,
int toIndex,
ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface OrderedIterable<T>public int detectIndex(Predicate<? super T> predicate)
detectIndex in interface OrderedIterable<T>public MutableSortedBag<T> tap(Procedure<? super T> procedure)
tap in interface Bag<T>tap in interface MutableBagIterable<T>tap in interface MutableSortedBag<T>tap in interface SortedBag<T>tap in interface MutableCollection<T>tap in interface OrderedIterable<T>tap in interface ReversibleIterable<T>tap in interface SortedIterable<T>tap in interface RichIterable<T>tap in class AbstractSynchronizedMutableCollection<T>public MutableSortedBag<T> select(Predicate<? super T> predicate)
select in interface Bag<T>select in interface MutableBagIterable<T>select in interface MutableSortedBag<T>select in interface SortedBag<T>select in interface MutableCollection<T>select in interface OrderedIterable<T>select in interface ReversibleIterable<T>select in interface SortedIterable<T>select in interface RichIterable<T>select in class AbstractSynchronizedMutableCollection<T>public <P> MutableSortedBag<T> selectWith(Predicate2<? super T,? super P> predicate, P parameter)
selectWith in interface Bag<T>selectWith in interface MutableBagIterable<T>selectWith in interface MutableSortedBag<T>selectWith in interface SortedBag<T>selectWith in interface MutableCollection<T>selectWith in interface OrderedIterable<T>selectWith in interface ReversibleIterable<T>selectWith in interface SortedIterable<T>selectWith in interface RichIterable<T>selectWith in class AbstractSynchronizedMutableCollection<T>public MutableSortedBag<T> reject(Predicate<? super T> predicate)
reject in interface Bag<T>reject in interface MutableBagIterable<T>reject in interface MutableSortedBag<T>reject in interface SortedBag<T>reject in interface MutableCollection<T>reject in interface OrderedIterable<T>reject in interface ReversibleIterable<T>reject in interface SortedIterable<T>reject in interface RichIterable<T>reject in class AbstractSynchronizedMutableCollection<T>public <P> MutableSortedBag<T> rejectWith(Predicate2<? super T,? super P> predicate, P parameter)
rejectWith in interface Bag<T>rejectWith in interface MutableBagIterable<T>rejectWith in interface MutableSortedBag<T>rejectWith in interface SortedBag<T>rejectWith in interface MutableCollection<T>rejectWith in interface OrderedIterable<T>rejectWith in interface ReversibleIterable<T>rejectWith in interface SortedIterable<T>rejectWith in interface RichIterable<T>rejectWith in class AbstractSynchronizedMutableCollection<T>public PartitionMutableSortedBag<T> partition(Predicate<? super T> predicate)
partition in interface Bag<T>partition in interface MutableBagIterable<T>partition in interface MutableSortedBag<T>partition in interface SortedBag<T>partition in interface MutableCollection<T>partition in interface OrderedIterable<T>partition in interface ReversibleIterable<T>partition in interface SortedIterable<T>partition in interface RichIterable<T>partition in class AbstractSynchronizedMutableCollection<T>public <P> PartitionMutableSortedBag<T> partitionWith(Predicate2<? super T,? super P> predicate, P parameter)
partitionWith in interface Bag<T>partitionWith in interface MutableBagIterable<T>partitionWith in interface MutableSortedBag<T>partitionWith in interface SortedBag<T>partitionWith in interface MutableCollection<T>partitionWith in interface OrderedIterable<T>partitionWith in interface ReversibleIterable<T>partitionWith in interface RichIterable<T>partitionWith in class AbstractSynchronizedMutableCollection<T>public MutableBooleanList collectBoolean(BooleanFunction<? super T> booleanFunction)
collectBoolean in interface MutableSortedBag<T>collectBoolean in interface SortedBag<T>collectBoolean in interface MutableCollection<T>collectBoolean in interface OrderedIterable<T>collectBoolean in interface ReversibleIterable<T>collectBoolean in interface RichIterable<T>collectBoolean in class AbstractSynchronizedMutableCollection<T>public MutableByteList collectByte(ByteFunction<? super T> byteFunction)
collectByte in interface MutableSortedBag<T>collectByte in interface SortedBag<T>collectByte in interface MutableCollection<T>collectByte in interface OrderedIterable<T>collectByte in interface ReversibleIterable<T>collectByte in interface RichIterable<T>collectByte in class AbstractSynchronizedMutableCollection<T>public MutableCharList collectChar(CharFunction<? super T> charFunction)
collectChar in interface MutableSortedBag<T>collectChar in interface SortedBag<T>collectChar in interface MutableCollection<T>collectChar in interface OrderedIterable<T>collectChar in interface ReversibleIterable<T>collectChar in interface RichIterable<T>collectChar in class AbstractSynchronizedMutableCollection<T>public MutableDoubleList collectDouble(DoubleFunction<? super T> doubleFunction)
collectDouble in interface MutableSortedBag<T>collectDouble in interface SortedBag<T>collectDouble in interface MutableCollection<T>collectDouble in interface OrderedIterable<T>collectDouble in interface ReversibleIterable<T>collectDouble in interface RichIterable<T>collectDouble in class AbstractSynchronizedMutableCollection<T>public MutableFloatList collectFloat(FloatFunction<? super T> floatFunction)
collectFloat in interface MutableSortedBag<T>collectFloat in interface SortedBag<T>collectFloat in interface MutableCollection<T>collectFloat in interface OrderedIterable<T>collectFloat in interface ReversibleIterable<T>collectFloat in interface RichIterable<T>collectFloat in class AbstractSynchronizedMutableCollection<T>public MutableIntList collectInt(IntFunction<? super T> intFunction)
collectInt in interface MutableSortedBag<T>collectInt in interface SortedBag<T>collectInt in interface MutableCollection<T>collectInt in interface OrderedIterable<T>collectInt in interface ReversibleIterable<T>collectInt in interface RichIterable<T>collectInt in class AbstractSynchronizedMutableCollection<T>public MutableLongList collectLong(LongFunction<? super T> longFunction)
collectLong in interface MutableSortedBag<T>collectLong in interface SortedBag<T>collectLong in interface MutableCollection<T>collectLong in interface OrderedIterable<T>collectLong in interface ReversibleIterable<T>collectLong in interface RichIterable<T>collectLong in class AbstractSynchronizedMutableCollection<T>public MutableShortList collectShort(ShortFunction<? super T> shortFunction)
collectShort in interface MutableSortedBag<T>collectShort in interface SortedBag<T>collectShort in interface MutableCollection<T>collectShort in interface OrderedIterable<T>collectShort in interface ReversibleIterable<T>collectShort in interface RichIterable<T>collectShort in class AbstractSynchronizedMutableCollection<T>public <S> MutableSortedBag<S> selectInstancesOf(Class<S> clazz)
selectInstancesOf in interface Bag<T>selectInstancesOf in interface MutableBagIterable<T>selectInstancesOf in interface MutableSortedBag<T>selectInstancesOf in interface SortedBag<T>selectInstancesOf in interface MutableCollection<T>selectInstancesOf in interface OrderedIterable<T>selectInstancesOf in interface ReversibleIterable<T>selectInstancesOf in interface SortedIterable<T>selectInstancesOf in interface RichIterable<T>selectInstancesOf in class AbstractSynchronizedMutableCollection<T>public <V> MutableList<V> collect(Function<? super T,? extends V> function)
collect in interface MutableSortedBag<T>collect in interface SortedBag<T>collect in interface MutableCollection<T>collect in interface OrderedIterable<T>collect in interface ReversibleIterable<T>collect in interface RichIterable<T>collect in class AbstractSynchronizedMutableCollection<T>public <V> MutableList<V> collectWithIndex(ObjectIntToObjectFunction<? super T,? extends V> function)
collectWithIndex in interface MutableSortedBag<T>collectWithIndex in interface SortedBag<T>collectWithIndex in interface OrderedIterable<T>collectWithIndex in interface ReversibleIterable<T>public <V,R extends Collection<V>> R collectWithIndex(ObjectIntToObjectFunction<? super T,? extends V> function, R target)
collectWithIndex in interface OrderedIterable<T>public MutableSortedSet<Pair<T,Integer>> zipWithIndex()
zipWithIndex in interface Bag<T>zipWithIndex in interface MutableBagIterable<T>zipWithIndex in interface MutableSortedBag<T>zipWithIndex in interface SortedBag<T>zipWithIndex in interface MutableCollection<T>zipWithIndex in interface OrderedIterable<T>zipWithIndex in interface ReversibleIterable<T>zipWithIndex in interface SortedIterable<T>zipWithIndex in interface RichIterable<T>zipWithIndex in class AbstractSynchronizedMutableCollection<T>public <P,V> MutableList<V> collectWith(Function2<? super T,? super P,? extends V> function, P parameter)
collectWith in interface MutableSortedBag<T>collectWith in interface SortedBag<T>collectWith in interface MutableCollection<T>collectWith in interface OrderedIterable<T>collectWith in interface ReversibleIterable<T>collectWith in interface RichIterable<T>collectWith in class AbstractSynchronizedMutableCollection<T>public <V> MutableList<V> collectIf(Predicate<? super T> predicate, Function<? super T,? extends V> function)
collectIf in interface MutableSortedBag<T>collectIf in interface SortedBag<T>collectIf in interface MutableCollection<T>collectIf in interface OrderedIterable<T>collectIf in interface ReversibleIterable<T>collectIf in interface RichIterable<T>collectIf in class AbstractSynchronizedMutableCollection<T>public <V> MutableList<V> flatCollect(Function<? super T,? extends Iterable<V>> function)
flatCollect in interface MutableSortedBag<T>flatCollect in interface SortedBag<T>flatCollect in interface MutableCollection<T>flatCollect in interface OrderedIterable<T>flatCollect in interface ReversibleIterable<T>flatCollect in interface RichIterable<T>flatCollect in class AbstractSynchronizedMutableCollection<T>public <V> MutableSortedBagMultimap<V,T> groupBy(Function<? super T,? extends V> function)
groupBy in interface Bag<T>groupBy in interface MutableBagIterable<T>groupBy in interface MutableSortedBag<T>groupBy in interface SortedBag<T>groupBy in interface MutableCollection<T>groupBy in interface OrderedIterable<T>groupBy in interface ReversibleIterable<T>groupBy in interface SortedIterable<T>groupBy in interface RichIterable<T>groupBy in class AbstractSynchronizedMutableCollection<T>public <V> MutableSortedBagMultimap<V,T> groupByEach(Function<? super T,? extends Iterable<V>> function)
groupByEach in interface Bag<T>groupByEach in interface MutableBagIterable<T>groupByEach in interface MutableSortedBag<T>groupByEach in interface SortedBag<T>groupByEach in interface MutableCollection<T>groupByEach in interface OrderedIterable<T>groupByEach in interface ReversibleIterable<T>groupByEach in interface SortedIterable<T>groupByEach in interface RichIterable<T>groupByEach in class AbstractSynchronizedMutableCollection<T>public <S> MutableList<Pair<T,S>> zip(Iterable<S> that)
zip in interface MutableSortedBag<T>zip in interface MutableCollection<T>zip in interface OrderedIterable<T>zip in interface ReversibleIterable<T>zip in interface SortedIterable<T>zip in interface RichIterable<T>zip in class AbstractSynchronizedMutableCollection<T>public MutableSortedBag<T> asUnmodifiable()
asUnmodifiable in interface MutableSortedBag<T>asUnmodifiable in interface MutableCollection<T>public MutableSortedBag<T> asSynchronized()
asSynchronized in interface MutableSortedBag<T>asSynchronized in interface MutableCollection<T>public ImmutableSortedBag<T> toImmutable()
toImmutable in interface Bag<T>toImmutable in interface SortedBag<T>toImmutable in interface MutableCollection<T>public MutableSortedBag<T> drop(int count)
drop in interface MutableSortedBag<T>drop in interface SortedBag<T>drop in interface ReversibleIterable<T>public MutableSortedBag<T> take(int count)
take in interface MutableSortedBag<T>take in interface SortedBag<T>take in interface ReversibleIterable<T>public MutableSortedBag<T> toReversed()
toReversed in interface MutableSortedBag<T>toReversed in interface SortedBag<T>toReversed in interface ReversibleIterable<T>public void reverseForEach(Procedure<? super T> procedure)
reverseForEach in interface ReversibleIterable<T>public void reverseForEachWithIndex(ObjectIntProcedure<? super T> procedure)
reverseForEachWithIndex in interface ReversibleIterable<T>public LazyIterable<T> asReversed()
asReversed in interface ReversibleIterable<T>public int detectLastIndex(Predicate<? super T> predicate)
detectLastIndex in interface ReversibleIterable<T>public ParallelBag<T> asParallel(ExecutorService executorService, int batchSize)
public Optional<T> getFirstOptional()
getFirstOptional in interface OrderedIterable<T>public Optional<T> getLastOptional()
getLastOptional in interface OrderedIterable<T>public MutableSortedSet<T> selectUnique()
selectUnique in interface Bag<T>selectUnique in interface MutableBagIterable<T>selectUnique in interface MutableSortedBag<T>selectUnique in interface SortedBag<T>public RichIterable<T> distinctView()
distinctView in interface Bag<T>Copyright © 2004–2022. All rights reserved.