HashBag, and is memory-optimized for byte 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 ByteIntHashMap | |
| private static final long | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(byte item)
Implements org.
|
| public boolean | addAll(byte... source)
Implements org.
|
| public boolean | |
| public void | addOccurrences(byte item, int occurrences)
Implements org.
|
| public boolean | allSatisfy(BytePredicate predicate)
Implements org. Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false. |
| public boolean | anySatisfy(BytePredicate predicate)
Implements org. Returns true if any of the elements in the ByteIterable 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 MutableByteBag | |
| public MutableByteBag | |
| public MutableList | bottomOccurrences(int count)
Implements org. Returns the |
| public MutableByteIterator | byteIterator()
Implements org. Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style. |
| public RichIterable | chunk(int size)
Overrides default org. Partitions elements in fixed size chunks. |
| public void | |
| public <V> MutableBag | collect(ByteToObjectFunction<? 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(byte value)
Implements org. Returns true if the value is contained in the ByteIterable, and false if it is not. |
| public int | count(BytePredicate predicate)
Implements org. Returns a count of the number of elements in the ByteIterable that return true for the specified predicate. |
| public byte | detectIfNone(BytePredicate predicate, byte ifNone)
Implements org.
|
| public void | each(ByteProcedure 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(ByteIntProcedure 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, ObjectByteToObjectFunction<? super T, ? extends T> function)
Implements org.
|
| public boolean | isEmpty()
Overrides default org. Returns true if this iterable has zero items. |
| public byte | |
| public byte | |
| public static ByteHashBag | |
| public static ByteHashBag | |
| public static ByteHashBag | |
| public static ByteHashBag | |
| public ByteHashBag | newEmpty()
Overrides default org. Creates a new empty ByteHashBag. |
| public boolean | noneSatisfy(BytePredicate predicate)
Overrides default org. Returns true if none of the elements in the ByteIterable return true for the specified predicate, otherwise returns false. |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public int | occurrencesOf(byte item)
Implements org. The occurrences of a distinct item in the bag. |
| protected MutableList | occurrencesSortingBy(int n, IntFunction<ByteIntPair> function, MutableList<ByteIntPair> 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 ByteHashBag | reject(BytePredicate predicate)
Implements org. Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate. |
| public boolean | remove(byte item)
Implements org.
|
| public boolean | removeAll(byte... source)
Implements org.
|
| public boolean | |
| public boolean | removeIf(BytePredicate predicate)
Overrides default org.
|
| public boolean | removeOccurrences(byte item, int occurrences)
Implements org.
|
| public boolean | |
| public boolean | retainAll(byte... source)
Implements org.
|
| public ByteHashBag | select(BytePredicate predicate)
Implements org. Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate. |
| public ByteHashBag | selectByOccurrences(IntPredicate predicate)
Implements org. Returns all elements of the bag that have a number of occurrences that satisfy the predicate. |
| public MutableByteSet | 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 byte[] | toArray()
Implements org. Converts the ByteIterable to a primitive byte array. |
| public byte[] | toArray(byte[] array)
Overrides default org. Converts the ByteIterable to a primitive byte array. |
| public ImmutableByteBag | toImmutable()
Implements org. Returns an immutable copy of this bag. |
| protected MutableList | |
| public MutableList | topOccurrences(int count)
Implements org. Returns the |
| public ByteHashBag | |
| public ByteHashBag | |
| public ByteHashBag | |
| public ByteHashBag | withAll(ByteIterable iterable)
Implements org.
|
| public ByteHashBag | |
| public ByteHashBag | withoutAll(ByteIterable 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 ByteIntHashMap items | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| size | back to summary |
|---|---|
| private int size | |
| ByteHashBag | back to summary |
|---|---|
| public ByteHashBag() | |
| ByteHashBag | back to summary |
|---|---|
| public ByteHashBag(int size) | |
| ByteHashBag | back to summary |
|---|---|
| public ByteHashBag(ByteIterable iterable) | |
| ByteHashBag | back to summary |
|---|---|
| public ByteHashBag(byte... elements) | |
| ByteHashBag | back to summary |
|---|---|
| public ByteHashBag(ByteHashBag bag) | |
| add | back to summary |
|---|---|
| public boolean add(byte item) Implements org.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(byte... source) Implements org.
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(ByteIterable source) Implements org.
| |
| addOccurrences | back to summary |
|---|---|
| public void addOccurrences(byte item, int occurrences) Implements org.
| |
| allSatisfy | back to summary |
|---|---|
| public boolean allSatisfy(BytePredicate predicate) Implements org. Doc from org. Returns true if all of the elements in the ByteIterable return true for the specified predicate, otherwise returns false.
| |
| anySatisfy | back to summary |
|---|---|
| public boolean anySatisfy(BytePredicate predicate) Implements org. Doc from org. Returns true if any of the elements in the ByteIterable 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 MutableByteBag asSynchronized() Implements org.
| |
| asUnmodifiable | back to summary |
|---|---|
| public MutableByteBag asUnmodifiable() Implements org.
| |
| bottomOccurrences | back to summary |
|---|---|
| public MutableList Implements org. Doc from org. Returns the
| |
| byteIterator | back to summary |
|---|---|
| public MutableByteIterator byteIterator() Implements org. Doc from org. Returns a primitive iterator that can be used to iterate over the ByteIterable in an imperative style.
| |
| 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(byte value) Implements org. Doc from org. Returns true if the value is contained in the ByteIterable, and false if it is not.
| |
| count | back to summary |
|---|---|
| public int count(BytePredicate predicate) Implements org. Doc from org. Returns a count of the number of elements in the ByteIterable that return true for the specified predicate.
| |
| detectIfNone | back to summary |
|---|---|
| public byte detectIfNone(BytePredicate predicate, byte ifNone) Implements org.
| |
| each | back to summary |
|---|---|
| public void each(ByteProcedure 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(ByteIntProcedure 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, ObjectByteToObjectFunction<? 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.
| |
| max | back to summary |
|---|---|
| public byte max() Implements org.
| |
| min | back to summary |
|---|---|
| public byte min() Implements org.
| |
| newBag | back to summary |
|---|---|
| public static ByteHashBag newBag(int size) | |
| newBag | back to summary |
|---|---|
| public static ByteHashBag newBag(ByteIterable source) | |
| newBag | back to summary |
|---|---|
| public static ByteHashBag newBag(ByteBag source) | |
| newBagWith | back to summary |
|---|---|
| public static ByteHashBag newBagWith(byte... source) | |
| newEmpty | back to summary |
|---|---|
| public ByteHashBag newEmpty() Overrides default org. Creates a new empty ByteHashBag.
| |
| noneSatisfy | back to summary |
|---|---|
| public boolean noneSatisfy(BytePredicate predicate) Overrides default org. Doc from org. Returns true if none of the elements in the ByteIterable 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(byte 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 ByteHashBag reject(BytePredicate predicate) Implements org. Doc from org. Returns a new ByteIterable with all of the elements in the ByteIterable that return false for the specified predicate.
| |
| remove | back to summary |
|---|---|
| public boolean remove(byte item) Implements org.
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(byte... source) Implements org.
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(ByteIterable source) Implements org.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(BytePredicate predicate) Overrides default org.
| |
| removeOccurrences | back to summary |
|---|---|
| public boolean removeOccurrences(byte item, int occurrences) Implements org.
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(ByteIterable source) Implements org.
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(byte... source) Implements org.
| |
| select | back to summary |
|---|---|
| public ByteHashBag select(BytePredicate predicate) Implements org. Doc from org. Returns a new ByteIterable with all of the elements in the ByteIterable that return true for the specified predicate.
| |
| selectByOccurrences | back to summary |
|---|---|
| public ByteHashBag 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 MutableByteSet 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 byte[] toArray() Implements org. Doc from org. Converts the ByteIterable to a primitive byte array.
| |
| toArray | back to summary |
|---|---|
| public byte[] toArray(byte[] array) Overrides default org. Doc from org. Converts the ByteIterable to a primitive byte 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 ImmutableByteBag 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 ByteHashBag with(byte element) Implements org.
| |
| with | back to summary |
|---|---|
| public ByteHashBag with(byte element1, byte element2) | |
| with | back to summary |
|---|---|
| public ByteHashBag with(byte element1, byte element2, byte element3) | |
| withAll | back to summary |
|---|---|
| public ByteHashBag withAll(ByteIterable iterable) Implements org.
| |
| without | back to summary |
|---|---|
| public ByteHashBag without(byte element) Implements org.
| |
| withoutAll | back to summary |
|---|---|
| public ByteHashBag withoutAll(ByteIterable 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 MutableByteIterator | |
| private boolean | |
| private byte | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public byte | |
| public void |
| byteIterator | back to summary |
|---|---|
| private MutableByteIterator byteIterator | |
| canRemove | back to summary |
|---|---|
| private boolean canRemove | |
| currentItem | back to summary |
|---|---|
| private byte currentItem | |
| 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 byte next() Implements org.
| |
| remove | back to summary |
|---|---|
| public void remove() Implements org.
| |