Class AbstractMutableShortValuesMap

java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
All Implemented Interfaces:
MutableShortValuesMap, ShortValuesMap, PrimitiveIterable, ShortIterable
Direct Known Subclasses:
ByteShortHashMap, CharShortHashMap, DoubleShortHashMap, FloatShortHashMap, IntShortHashMap, LongShortHashMap, ShortShortHashMap

public abstract class AbstractMutableShortValuesMap extends AbstractShortIterable implements MutableShortValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
Since:
6.0.
  • Constructor Details

    • AbstractMutableShortValuesMap

      public AbstractMutableShortValuesMap()
  • Method Details

    • contains

      public boolean contains(short value)
      Description copied from interface: ShortIterable
      Returns true if the value is contained in the ShortIterable, and false if it is not.
      Specified by:
      contains in interface ShortIterable
    • containsAll

      public boolean containsAll(ShortIterable source)
      Description copied from interface: ShortIterable
      Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.
      Specified by:
      containsAll in interface ShortIterable
    • max

      public short max()
      Specified by:
      max in interface ShortIterable
    • min

      public short min()
      Specified by:
      min in interface ShortIterable
    • size

      public int size()
      Description copied from interface: PrimitiveIterable
      Returns the number of items in this iterable.
      Specified by:
      size in interface PrimitiveIterable
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: PrimitiveIterable
      Returns true if this iterable has zero items.
      Specified by:
      isEmpty in interface PrimitiveIterable
    • notEmpty

      public boolean notEmpty()
      Description copied from interface: PrimitiveIterable
      The English equivalent of !this.isEmpty()
      Specified by:
      notEmpty in interface PrimitiveIterable
    • forEach

      public void forEach(ShortProcedure procedure)
      Description copied from interface: ShortIterable
      Applies the ShortProcedure to each element in the ShortIterable.
      Specified by:
      forEach in interface ShortIterable
    • each

      public void each(ShortProcedure procedure)
      Description copied from interface: ShortIterable
      A synonym for forEach.
      Specified by:
      each in interface ShortIterable
      Since:
      7.0.
    • appendString

      public void appendString(Appendable appendable, String start, String separator, String end)
      Description copied from interface: PrimitiveIterable
      Prints a string representation of this collection onto the given Appendable. Prints the string returned by PrimitiveIterable.makeString(String, String, String).
      Specified by:
      appendString in interface PrimitiveIterable
    • toArray

      public short[] toArray()
      Description copied from interface: ShortIterable
      Converts the ShortIterable to a primitive short array.
      Specified by:
      toArray in interface ShortIterable
    • toArray

      public short[] toArray(short[] target)
      Description copied from interface: ShortIterable
      Converts the ShortIterable to a primitive short 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.
      Specified by:
      toArray in interface ShortIterable
    • select

      public MutableShortBag select(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.
      Specified by:
      select in interface MutableShortValuesMap
      Specified by:
      select in interface ShortIterable
      Specified by:
      select in interface ShortValuesMap
    • reject

      public MutableShortBag reject(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.
      Specified by:
      reject in interface MutableShortValuesMap
      Specified by:
      reject in interface ShortIterable
      Specified by:
      reject in interface ShortValuesMap
    • collect

      public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
      Description copied from interface: ShortIterable
      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.
      Specified by:
      collect in interface MutableShortValuesMap
      Specified by:
      collect in interface ShortIterable
      Specified by:
      collect in interface ShortValuesMap
    • detectIfNone

      public short detectIfNone(ShortPredicate predicate, short value)
      Specified by:
      detectIfNone in interface ShortIterable
    • count

      public int count(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.
      Specified by:
      count in interface ShortIterable
    • anySatisfy

      public boolean anySatisfy(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      anySatisfy in interface ShortIterable
    • allSatisfy

      public boolean allSatisfy(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      allSatisfy in interface ShortIterable
    • noneSatisfy

      public boolean noneSatisfy(ShortPredicate predicate)
      Description copied from interface: ShortIterable
      Returns true if none of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.
      Specified by:
      noneSatisfy in interface ShortIterable
    • chunk

      public RichIterable<ShortIterable> chunk(int size)
      Description copied from interface: ShortIterable
      Partitions elements in fixed size chunks.
      Specified by:
      chunk in interface ShortIterable
      Parameters:
      size - the number of elements per chunk
      Returns:
      A RichIterable containing ShortIterables of size size, except the last will be truncated if the elements don't divide evenly.
    • sum

      public long sum()
      Specified by:
      sum in interface ShortIterable
    • containsValue

      public boolean containsValue(short value)
      Description copied from interface: ShortValuesMap
      Returns whether or not this map contains the value.
      Specified by:
      containsValue in interface ShortValuesMap
      Parameters:
      value - the value to test
      Returns:
      if this collection contains the value
    • forEachValue

      public void forEachValue(ShortProcedure procedure)
      Description copied from interface: ShortValuesMap
      Iterates through each value in this map.
      Specified by:
      forEachValue in interface ShortValuesMap
      Parameters:
      procedure - the procedure to invoke for each value in this map.