HashBag, and is memory-optimized for long primitives.
This file was automatically generated from template file primitiveHashBag.stg.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private LongIntHashMap | |
| private static final long | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(long item)
Implements org.
|
| public boolean | addAll(long... source)
Implements org.
|
| public boolean | |
| public void | addOccurrences(long item, int occurrences)
Implements org.
|
| public boolean | allSatisfy(LongPredicate predicate)
Implements org. Returns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false. |
| public boolean | anySatisfy(LongPredicate predicate)
Implements org. Returns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false. |
| public void | appendString(Appendable appendable, String start, String separator, String end)
Implements org. Prints a string representation of this collection onto the given |
| public MutableLongBag | |
| public MutableLongBag | |
| public MutableList | bottomOccurrences(int count)
Implements org. Returns the |
| public RichIterable | chunk(int size)
Overrides default org. Partitions elements in fixed size chunks. |
| public void | |
| public <V> MutableBag | collect(LongToObjectFunction<? extends V> function)
Implements org. Returns a new collection with the results of applying the specified function on each element of the source collection. |
| public boolean | contains(long value)
Implements org. Returns true if the value is contained in the LongIterable, and false if it is not. |
| public int | count(LongPredicate predicate)
Implements org. Returns a count of the number of elements in the LongIterable that return true for the specified predicate. |
| public long | detectIfNone(LongPredicate predicate, long ifNone)
Implements org.
|
| public void | each(LongProcedure procedure)
Implements org. A synonym for forEach. |
| public boolean | equals(Object otherBag)
Overrides java. Implements org. Follows the same general contract as |
| public void | forEachWithOccurrences(LongIntProcedure procedure)
Implements org. For each distinct item, with the number of occurrences, execute the specified procedure. |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| public <T> T | injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function)
Implements org.
|
| public boolean | isEmpty()
Overrides default org. Returns true if this iterable has zero items. |
| public MutableLongIterator | longIterator()
Implements org. Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style. |
| public long | |
| public long | |
| public static LongHashBag | |
| public static LongHashBag | |
| public static LongHashBag | |
| public static LongHashBag | |
| public LongHashBag | newEmpty()
Overrides default org. Creates a new empty LongHashBag. |
| public boolean | noneSatisfy(LongPredicate predicate)
Overrides default org. Returns true if none of the elements in the LongIterable return true for the specified predicate, otherwise returns false. |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public int | occurrencesOf(long item)
Implements org. The occurrences of a distinct item in the bag. |
| protected MutableList | occurrencesSortingBy(int n, IntFunction<LongIntPair> function, MutableList<LongIntPair> returnWhenEmpty)
|
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public LongHashBag | reject(LongPredicate predicate)
Implements org. Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate. |
| public boolean | remove(long item)
Implements org.
|
| public boolean | removeAll(long... source)
Implements org.
|
| public boolean | |
| public boolean | removeIf(LongPredicate predicate)
Overrides default org.
|
| public boolean | removeOccurrences(long item, int occurrences)
Implements org.
|
| public boolean | |
| public boolean | retainAll(long... source)
Implements org.
|
| public LongHashBag | select(LongPredicate predicate)
Implements org. Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate. |
| public LongHashBag | selectByOccurrences(IntPredicate predicate)
Implements org. Returns all elements of the bag that have a number of occurrences that satisfy the predicate. |
| public MutableLongSet | selectUnique()
Implements org. Returns all elements of the bag that have exactly one occurrence. |
| public int | size()
Implements org. Returns the number of items in this iterable. |
| public int | sizeDistinct()
Implements org. The size of the Bag when counting only distinct elements. |
| public long | |
| public long[] | toArray()
Implements org. Converts the LongIterable to a primitive long array. |
| public long[] | toArray(long[] array)
Overrides default org. Converts the LongIterable to a primitive long array. |
| public ImmutableLongBag | toImmutable()
Implements org. Returns an immutable copy of this bag. |
| protected MutableList | |
| public MutableList | topOccurrences(int count)
Implements org. Returns the |
| public LongHashBag | |
| public LongHashBag | |
| public LongHashBag | |
| public LongHashBag | withAll(LongIterable iterable)
Implements org.
|
| public LongHashBag | |
| public LongHashBag | withoutAll(LongIterable iterable)
Implements org.
|
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |
| items | back to summary |
|---|---|
| private LongIntHashMap items | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| size | back to summary |
|---|---|
| private int size | |
| LongHashBag | back to summary |
|---|---|
| public LongHashBag() | |
| LongHashBag | back to summary |
|---|---|
| public LongHashBag(int size) | |
| LongHashBag | back to summary |
|---|---|
| public LongHashBag(LongIterable iterable) | |
| LongHashBag | back to summary |
|---|---|
| public LongHashBag(long... elements) | |
| LongHashBag | back to summary |
|---|---|
| public LongHashBag(LongHashBag bag) | |
| add | back to summary |
|---|---|
| public boolean add(long item) Implements org.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(long... source) Implements org.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(LongIterable source) Implements org.
| |
| addOccurrences | back to summary |
|---|---|
| public void addOccurrences(long item, int occurrences) Implements org.
| |
| allSatisfy | back to summary |
|---|---|
| public boolean allSatisfy(LongPredicate predicate) Implements org. Doc from org. Returns true if all of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
| |
| anySatisfy | back to summary |
|---|---|
| public boolean anySatisfy(LongPredicate predicate) Implements org. Doc from org. Returns true if any of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
| |
| appendString | back to summary |
|---|---|
| public void appendString(Appendable appendable, String start, String separator, String end) Implements org. Doc from org. Prints a string representation of this collection onto the given
| |
| asSynchronized | back to summary |
|---|---|
| public MutableLongBag asSynchronized() Implements org.
| |
| asUnmodifiable | back to summary |
|---|---|
| public MutableLongBag asUnmodifiable() Implements org.
| |
| bottomOccurrences | back to summary |
|---|---|
| public MutableList Implements org. Doc from org. Returns the
| |
| chunk | back to summary |
|---|---|
| public RichIterable Overrides default org. Doc from org. Partitions elements in fixed size chunks.
| |
| clear | back to summary |
|---|---|
| public void clear() Implements org.
| |
| collect | back to summary |
|---|---|
| public <V> MutableBag Implements org. Doc from org. Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.
| |
| contains | back to summary |
|---|---|
| public boolean contains(long value) Implements org. Doc from org. Returns true if the value is contained in the LongIterable, and false if it is not.
| |
| count | back to summary |
|---|---|
| public int count(LongPredicate predicate) Implements org. Doc from org. Returns a count of the number of elements in the LongIterable that return true for the specified predicate.
| |
| detectIfNone | back to summary |
|---|---|
| public long detectIfNone(LongPredicate predicate, long ifNone) Implements org.
| |
| each | back to summary |
|---|---|
| public void each(LongProcedure procedure) Implements org. Doc from org. A synonym for forEach.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object otherBag) Overrides java. Implements org. Doc from org. Follows the same general contract as
| |
| forEachWithOccurrences | back to summary |
|---|---|
| public void forEachWithOccurrences(LongIntProcedure procedure) Implements org. Doc from org. For each distinct item, with the number of occurrences, execute the specified procedure.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Implements org. Doc from org. Follows the same general contract as
| |
| injectInto | back to summary |
|---|---|
| public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function) Implements org.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides default org. Doc from org. Returns true if this iterable has zero items.
| |
| longIterator | back to summary |
|---|---|
| public MutableLongIterator longIterator() Implements org. Doc from org. Returns a primitive iterator that can be used to iterate over the LongIterable in an imperative style.
| |
| max | back to summary |
|---|---|
| public long max() Implements org.
| |
| min | back to summary |
|---|---|
| public long min() Implements org.
| |
| newBag | back to summary |
|---|---|
| public static LongHashBag newBag(int size) | |
| newBag | back to summary |
|---|---|
| public static LongHashBag newBag(LongIterable source) | |
| newBag | back to summary |
|---|---|
| public static LongHashBag newBag(LongBag source) | |
| newBagWith | back to summary |
|---|---|
| public static LongHashBag newBagWith(long... source) | |
| newEmpty | back to summary |
|---|---|
| public LongHashBag newEmpty() Overrides default org. Creates a new empty LongHashBag.
| |
| noneSatisfy | back to summary |
|---|---|
| public boolean noneSatisfy(LongPredicate predicate) Overrides default org. Doc from org. Returns true if none of the elements in the LongIterable return true for the specified predicate, otherwise returns false.
| |
| notEmpty | back to summary |
|---|---|
| public boolean notEmpty() Overrides default org. Doc from org. The English equivalent of !this.isEmpty()
| |
| occurrencesOf | back to summary |
|---|---|
| public int occurrencesOf(long item) Implements org. Doc from org. The occurrences of a distinct item in the bag.
| |
| occurrencesSortingBy | back to summary |
|---|---|
| protected MutableList | |
| readExternal | back to summary |
|---|---|
| public void readExternal(ObjectInput in) throws IOException Implements java. Doc from java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.
| |
| reject | back to summary |
|---|---|
| public LongHashBag reject(LongPredicate predicate) Implements org. Doc from org. Returns a new LongIterable with all of the elements in the LongIterable that return false for the specified predicate.
| |
| remove | back to summary |
|---|---|
| public boolean remove(long item) Implements org.
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(long... source) Implements org.
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(LongIterable source) Implements org.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(LongPredicate predicate) Overrides default org.
| |
| removeOccurrences | back to summary |
|---|---|
| public boolean removeOccurrences(long item, int occurrences) Implements org.
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(LongIterable source) Implements org.
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(long... source) Implements org.
| |
| select | back to summary |
|---|---|
| public LongHashBag select(LongPredicate predicate) Implements org. Doc from org. Returns a new LongIterable with all of the elements in the LongIterable that return true for the specified predicate.
| |
| selectByOccurrences | back to summary |
|---|---|
| public LongHashBag selectByOccurrences(IntPredicate predicate) Implements org. Doc from org. Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
| |
| selectUnique | back to summary |
|---|---|
| public MutableLongSet selectUnique() Implements org. Doc from org. Returns all elements of the bag that have exactly one occurrence.
| |
| size | back to summary |
|---|---|
| public int size() Implements org. Doc from org. Returns the number of items in this iterable.
| |
| sizeDistinct | back to summary |
|---|---|
| public int sizeDistinct() Implements org. Doc from org. The size of the Bag when counting only distinct elements.
| |
| sum | back to summary |
|---|---|
| public long sum() Implements org.
| |
| toArray | back to summary |
|---|---|
| public long[] toArray() Implements org. Doc from org. Converts the LongIterable to a primitive long array.
| |
| toArray | back to summary |
|---|---|
| public long[] toArray(long[] array) Overrides default org. Doc from org. Converts the LongIterable to a primitive long array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.
| |
| toImmutable | back to summary |
|---|---|
| public ImmutableLongBag toImmutable() Implements org. Doc from org. Returns an immutable copy of this bag.
| |
| toListWithOccurrences | back to summary |
|---|---|
| protected MutableList | |
| topOccurrences | back to summary |
|---|---|
| public MutableList Implements org. Doc from org. Returns the
| |
| with | back to summary |
|---|---|
| public LongHashBag with(long element) Implements org.
| |
| with | back to summary |
|---|---|
| public LongHashBag with(long element1, long element2) | |
| with | back to summary |
|---|---|
| public LongHashBag with(long element1, long element2, long element3) | |
| withAll | back to summary |
|---|---|
| public LongHashBag withAll(LongIterable iterable) Implements org.
| |
| without | back to summary |
|---|---|
| public LongHashBag without(long element) Implements org.
| |
| withoutAll | back to summary |
|---|---|
| public LongHashBag withoutAll(LongIterable iterable) Implements org.
| |
| writeExternal | back to summary |
|---|---|
| public void writeExternal(ObjectOutput out) throws IOException Implements java. Doc from java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private long | |
| private MutableLongIterator | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public long | |
| public void |
| canRemove | back to summary |
|---|---|
| private boolean canRemove | |
| currentItem | back to summary |
|---|---|
| private long currentItem | |
| longIterator | back to summary |
|---|---|
| private MutableLongIterator longIterator | |
| occurrences | back to summary |
|---|---|
| private int occurrences | |
| InternalIterator | back to summary |
|---|---|
| private InternalIterator() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements org.
| |
| next | back to summary |
|---|---|
| public long next() Implements org.
| |
| remove | back to summary |
|---|---|
| public void remove() Implements org.
| |