public class TreeBag<T> extends AbstractMutableSortedBag<T> implements Externalizable
| Constructor and Description |
|---|
TreeBag() |
TreeBag(Comparator<? super T> comparator) |
TreeBag(Comparator<? super T> comparator,
Iterable<? extends T> iterable) |
TreeBag(org.eclipse.collections.api.bag.sorted.SortedBag<T> sortedBag) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T item) |
void |
addOccurrences(T item,
int occurrences) |
void |
clear() |
TreeBag<T> |
clone() |
Comparator<? super T> |
comparator() |
int |
compareTo(org.eclipse.collections.api.bag.sorted.SortedBag<T> otherBag) |
boolean |
contains(Object o) |
<S> boolean |
corresponds(org.eclipse.collections.api.ordered.OrderedIterable<S> other,
org.eclipse.collections.api.block.predicate.Predicate2<? super T,? super S> predicate) |
int |
detectIndex(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate) |
org.eclipse.collections.api.set.sorted.MutableSortedSet<T> |
distinct() |
org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> |
drop(int count) |
void |
each(org.eclipse.collections.api.block.procedure.Procedure<? super T> procedure) |
boolean |
equals(Object other) |
void |
forEach(int fromIndex,
int toIndex,
org.eclipse.collections.api.block.procedure.Procedure<? super T> procedure) |
<P> void |
forEachWith(org.eclipse.collections.api.block.procedure.Procedure2<? super T,? super P> procedure,
P parameter) |
void |
forEachWithIndex(int fromIndex,
int toIndex,
org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
void |
forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure) |
void |
forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> procedure) |
<V> TreeBagMultimap<V,T> |
groupBy(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function) |
<V> TreeBagMultimap<V,T> |
groupByEach(org.eclipse.collections.api.block.function.Function<? super T,? extends Iterable<V>> function) |
int |
hashCode() |
int |
indexOf(Object object) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
static <E> TreeBag<E> |
newBag() |
static <E> TreeBag<E> |
newBag(Comparator<? super E> comparator) |
static <E> TreeBag<E> |
newBag(Comparator<? super E> comparator,
Iterable<? extends E> iterable) |
static <E> TreeBag<E> |
newBag(Iterable<? extends E> source) |
static <E> TreeBag<E> |
newBagWith(Comparator<? super E> comparator,
E... elements) |
static <E> TreeBag<E> |
newBagWith(E... elements) |
org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> |
newEmpty() |
int |
occurrencesOf(Object item) |
void |
readExternal(ObjectInput in) |
boolean |
remove(Object item) |
boolean |
removeAllIterable(Iterable<?> iterable) |
boolean |
removeIf(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate) |
<P> boolean |
removeIfWith(org.eclipse.collections.api.block.predicate.Predicate2<? super T,? super P> predicate,
P parameter) |
boolean |
removeOccurrences(Object item,
int occurrences) |
org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> |
selectByOccurrences(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
boolean |
setOccurrences(T item,
int occurrences) |
int |
size() |
int |
sizeDistinct() |
org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> |
take(int count) |
org.eclipse.collections.api.stack.MutableStack<T> |
toStack() |
TreeBag<T> |
with(T... elements) |
TreeBag<T> |
with(T element) |
TreeBag<T> |
with(T element1,
T element2) |
TreeBag<T> |
with(T element1,
T element2,
T element3) |
TreeBag<T> |
withAll(Iterable<? extends T> iterable) |
TreeBag<T> |
without(T element) |
TreeBag<T> |
withoutAll(Iterable<? extends T> iterable) |
void |
writeExternal(ObjectOutput out) |
org.eclipse.collections.api.set.sorted.MutableSortedSet<org.eclipse.collections.api.tuple.Pair<T,Integer>> |
zipWithIndex() |
asParallel, asReversed, asSynchronized, asUnmodifiable, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, detectLastIndex, dropWhile, flatCollect, partition, partitionWhile, partitionWith, reject, rejectWith, reverseForEach, select, selectInstancesOf, selectWith, takeWhile, tap, toImmutable, toMapOfItemToCount, toReversed, zipaddAll, addAllIterable, aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, bottomOccurrences, chunk, detect, detectIfNone, detectWith, detectWithIfNone, getFirst, getLast, groupByUniqueKey, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, removeAll, retainAll, retainAllIterable, selectAndRejectWith, topOccurrencescollect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, count, flatCollect, 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, appendString, asLazy, containsAll, containsAllArguments, containsAllIterable, countWith, forEach, groupByUniqueKey, makeString, makeString, makeString, notEmpty, sumByDouble, sumByFloat, sumByInt, sumByLong, toArray, toArray, toMap, toSortedBagBy, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSetBy, toString, zip, zipWithIndexaggregateBy, aggregateInPlaceBygetFirst, getLast, zip, zipWithIndexallSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectInt, collectLong, collectShort, collectWith, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, flatCollect, groupBy, groupByEach, groupByUniqueKey, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, makeString, makeString, makeString, max, maxBy, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, reject, rejectWith, select, selectWith, sumByDouble, sumByFloat, sumByInt, sumByLong, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedBag, toSortedBag, toSortedBagBy, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, toStringforEach, spliteratorbottomOccurrences, topOccurrencesaddAllIterable, groupByUniqueKey, injectIntoWith, retainAllIterable, selectAndRejectWithaddAll, containsAll, parallelStream, removeAll, removeIf, retainAll, spliterator, stream, toArray, toArraypublic TreeBag()
public TreeBag(Comparator<? super T> comparator)
public TreeBag(org.eclipse.collections.api.bag.sorted.SortedBag<T> sortedBag)
public TreeBag(Comparator<? super T> comparator, Iterable<? extends T> iterable)
public static <E> TreeBag<E> newBag()
public static <E> TreeBag<E> newBag(Comparator<? super E> comparator)
public static <E> TreeBag<E> newBag(Comparator<? super E> comparator, Iterable<? extends E> iterable)
public static <E> TreeBag<E> newBagWith(E... elements)
public static <E> TreeBag<E> newBagWith(Comparator<? super E> comparator, E... elements)
public TreeBag<T> clone()
clone in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>clone in class AbstractMutableSortedBag<T>public boolean equals(Object other)
public int hashCode()
public int sizeDistinct()
sizeDistinct in interface org.eclipse.collections.api.bag.Bag<T>public void forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> procedure)
forEachWithOccurrences in interface org.eclipse.collections.api.bag.Bag<T>public org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> selectByOccurrences(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
selectByOccurrences in interface org.eclipse.collections.api.bag.Bag<T>selectByOccurrences in interface org.eclipse.collections.api.bag.MutableBagIterable<T>selectByOccurrences in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>selectByOccurrences in interface org.eclipse.collections.api.bag.sorted.SortedBag<T>public int occurrencesOf(Object item)
occurrencesOf in interface org.eclipse.collections.api.bag.Bag<T>public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface org.eclipse.collections.api.RichIterable<T>isEmpty in class AbstractRichIterable<T>public boolean remove(Object item)
remove in interface Collection<T>public void clear()
clear in interface Collection<T>public boolean contains(Object o)
contains in interface Collection<T>contains in interface org.eclipse.collections.api.RichIterable<T>contains in class AbstractRichIterable<T>public int compareTo(org.eclipse.collections.api.bag.sorted.SortedBag<T> otherBag)
compareTo in interface Comparable<org.eclipse.collections.api.bag.sorted.SortedBag<T>>public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void each(org.eclipse.collections.api.block.procedure.Procedure<? super T> procedure)
each in interface org.eclipse.collections.api.RichIterable<T>public void forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface org.eclipse.collections.api.InternalIterable<T>forEachWithIndex in interface org.eclipse.collections.api.ordered.OrderedIterable<T>forEachWithIndex in class AbstractRichIterable<T>public void forEach(int fromIndex,
int toIndex,
org.eclipse.collections.api.block.procedure.Procedure<? super T> procedure)
forEach in interface org.eclipse.collections.api.ordered.OrderedIterable<T>public void forEachWithIndex(int fromIndex,
int toIndex,
org.eclipse.collections.api.block.procedure.primitive.ObjectIntProcedure<? super T> objectIntProcedure)
forEachWithIndex in interface org.eclipse.collections.api.ordered.OrderedIterable<T>public <P> void forEachWith(org.eclipse.collections.api.block.procedure.Procedure2<? super T,? super P> procedure, P parameter)
forEachWith in interface org.eclipse.collections.api.InternalIterable<T>forEachWith in class AbstractRichIterable<T>public void addOccurrences(T item, int occurrences)
addOccurrences in interface org.eclipse.collections.api.bag.MutableBagIterable<T>public boolean removeOccurrences(Object item, int occurrences)
removeOccurrences in interface org.eclipse.collections.api.bag.MutableBagIterable<T>public boolean setOccurrences(T item, int occurrences)
setOccurrences in interface org.eclipse.collections.api.bag.MutableBagIterable<T>public org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> newEmpty()
public boolean removeIf(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate)
removeIf in interface org.eclipse.collections.api.collection.MutableCollection<T>public <P> boolean removeIfWith(org.eclipse.collections.api.block.predicate.Predicate2<? super T,? super P> predicate, P parameter)
removeIfWith in interface org.eclipse.collections.api.collection.MutableCollection<T>public boolean removeAllIterable(Iterable<?> iterable)
removeAllIterable in interface org.eclipse.collections.api.collection.MutableCollection<T>public int size()
size in interface Collection<T>size in interface org.eclipse.collections.api.RichIterable<T>public int indexOf(Object object)
indexOf in interface org.eclipse.collections.api.ordered.OrderedIterable<T>public org.eclipse.collections.api.set.sorted.MutableSortedSet<org.eclipse.collections.api.tuple.Pair<T,Integer>> zipWithIndex()
zipWithIndex in interface org.eclipse.collections.api.bag.Bag<T>zipWithIndex in interface org.eclipse.collections.api.bag.MutableBagIterable<T>zipWithIndex in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>zipWithIndex in interface org.eclipse.collections.api.bag.sorted.SortedBag<T>zipWithIndex in interface org.eclipse.collections.api.collection.MutableCollection<T>zipWithIndex in interface org.eclipse.collections.api.ordered.OrderedIterable<T>zipWithIndex in interface org.eclipse.collections.api.ordered.ReversibleIterable<T>zipWithIndex in interface org.eclipse.collections.api.ordered.SortedIterable<T>zipWithIndex in interface org.eclipse.collections.api.RichIterable<T>public org.eclipse.collections.api.set.sorted.MutableSortedSet<T> distinct()
distinct in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>distinct in interface org.eclipse.collections.api.bag.sorted.SortedBag<T>distinct in interface org.eclipse.collections.api.ordered.OrderedIterable<T>distinct in interface org.eclipse.collections.api.ordered.ReversibleIterable<T>distinct in interface org.eclipse.collections.api.ordered.SortedIterable<T>public <V> TreeBagMultimap<V,T> groupBy(org.eclipse.collections.api.block.function.Function<? super T,? extends V> function)
groupBy in interface org.eclipse.collections.api.bag.Bag<T>groupBy in interface org.eclipse.collections.api.bag.MutableBagIterable<T>groupBy in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>groupBy in interface org.eclipse.collections.api.bag.sorted.SortedBag<T>groupBy in interface org.eclipse.collections.api.collection.MutableCollection<T>groupBy in interface org.eclipse.collections.api.ordered.OrderedIterable<T>groupBy in interface org.eclipse.collections.api.ordered.ReversibleIterable<T>groupBy in interface org.eclipse.collections.api.ordered.SortedIterable<T>groupBy in interface org.eclipse.collections.api.RichIterable<T>public <V> TreeBagMultimap<V,T> groupByEach(org.eclipse.collections.api.block.function.Function<? super T,? extends Iterable<V>> function)
groupByEach in interface org.eclipse.collections.api.bag.Bag<T>groupByEach in interface org.eclipse.collections.api.bag.MutableBagIterable<T>groupByEach in interface org.eclipse.collections.api.bag.sorted.MutableSortedBag<T>groupByEach in interface org.eclipse.collections.api.bag.sorted.SortedBag<T>groupByEach in interface org.eclipse.collections.api.collection.MutableCollection<T>groupByEach in interface org.eclipse.collections.api.ordered.OrderedIterable<T>groupByEach in interface org.eclipse.collections.api.ordered.ReversibleIterable<T>groupByEach in interface org.eclipse.collections.api.ordered.SortedIterable<T>groupByEach in interface org.eclipse.collections.api.RichIterable<T>public int detectIndex(org.eclipse.collections.api.block.predicate.Predicate<? super T> predicate)
detectIndex in interface org.eclipse.collections.api.ordered.OrderedIterable<T>public <S> boolean corresponds(org.eclipse.collections.api.ordered.OrderedIterable<S> other,
org.eclipse.collections.api.block.predicate.Predicate2<? super T,? super S> predicate)
corresponds in interface org.eclipse.collections.api.ordered.OrderedIterable<T>public org.eclipse.collections.api.stack.MutableStack<T> toStack()
public org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> take(int count)
public org.eclipse.collections.api.bag.sorted.MutableSortedBag<T> drop(int count)
public Comparator<? super T> comparator()
public boolean add(T item)
add in interface Collection<T>Copyright © 2004–2018. All rights reserved.