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