HashBag, and is memory-optimized for short 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 ShortIntHashMap | |
| private static final long | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(short item)
Implements org.
|
| public boolean | addAll(short... source)
Implements org.
|
| public boolean | |
| public void | addOccurrences(short item, int occurrences)
Implements org.
|
| public boolean | allSatisfy(ShortPredicate predicate)
Implements org. Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false. |
| public boolean | anySatisfy(ShortPredicate predicate)
Implements org. Returns true if any of the elements in the ShortIterable 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 MutableShortBag | |
| public MutableShortBag | |
| 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(ShortToObjectFunction<? 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(short value)
Implements org. Returns true if the value is contained in the ShortIterable, and false if it is not. |
| public int | count(ShortPredicate predicate)
Implements org. Returns a count of the number of elements in the ShortIterable that return true for the specified predicate. |
| public short | detectIfNone(ShortPredicate predicate, short ifNone)
Implements org.
|
| public void | each(ShortProcedure 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(ShortIntProcedure 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, ObjectShortToObjectFunction<? super T, ? extends T> function)
Implements org.
|
| public boolean | isEmpty()
Overrides default org. Returns true if this iterable has zero items. |
| public short | |
| public short | |
| public static ShortHashBag | |
| public static ShortHashBag | |
| public static ShortHashBag | |
| public static ShortHashBag | |
| public ShortHashBag | newEmpty()
Overrides default org. Creates a new empty ShortHashBag. |
| public boolean | noneSatisfy(ShortPredicate predicate)
Overrides default org. Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false. |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public int | occurrencesOf(short item)
Implements org. The occurrences of a distinct item in the bag. |
| protected MutableList | occurrencesSortingBy(int n, IntFunction<ShortIntPair> function, MutableList<ShortIntPair> 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 ShortHashBag | reject(ShortPredicate predicate)
Implements org. Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate. |
| public boolean | remove(short item)
Implements org.
|
| public boolean | removeAll(short... source)
Implements org.
|
| public boolean | |
| public boolean | removeIf(ShortPredicate predicate)
Overrides default org.
|
| public boolean | removeOccurrences(short item, int occurrences)
Implements org.
|
| public boolean | |
| public boolean | retainAll(short... source)
Implements org.
|
| public ShortHashBag | select(ShortPredicate predicate)
Implements org. Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate. |
| public ShortHashBag | selectByOccurrences(IntPredicate predicate)
Implements org. Returns all elements of the bag that have a number of occurrences that satisfy the predicate. |
| public MutableShortSet | selectUnique()
Implements org. Returns all elements of the bag that have exactly one occurrence. |
| public MutableShortIterator | shortIterator()
Implements org. Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style. |
| 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 short[] | toArray()
Implements org. Converts the ShortIterable to a primitive short array. |
| public short[] | toArray(short[] array)
Overrides default org. Converts the ShortIterable to a primitive short array. |
| public ImmutableShortBag | toImmutable()
Implements org. Returns an immutable copy of this bag. |
| protected MutableList | |
| public MutableList | topOccurrences(int count)
Implements org. Returns the |
| public ShortHashBag | |
| public ShortHashBag | |
| public ShortHashBag | |
| public ShortHashBag | withAll(ShortIterable iterable)
Implements org.
|
| public ShortHashBag | |
| public ShortHashBag | withoutAll(ShortIterable 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. |