Class AbstractMutableIntValuesMap

java.lang.Object
org.eclipse.collections.impl.primitive.AbstractIntIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableIntValuesMap
All Implemented Interfaces:
IntIterable, IntValuesMap, MutableIntValuesMap, PrimitiveIterable
Direct Known Subclasses:
ByteIntHashMap, CharIntHashMap, DoubleIntHashMap, FloatIntHashMap, IntIntHashMap, LongIntHashMap, ShortIntHashMap

public abstract class AbstractMutableIntValuesMap extends AbstractIntIterable implements MutableIntValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
Since:
6.0.
  • Constructor Details

    • AbstractMutableIntValuesMap

      public AbstractMutableIntValuesMap()
  • Method Details

    • contains

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

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

      public int max()
      Specified by:
      max in interface IntIterable
    • min

      public int min()
      Specified by:
      min in interface IntIterable
    • 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
    • each

      public void each(IntProcedure procedure)
      Description copied from interface: IntIterable
      A synonym for forEach.
      Specified by:
      each in interface IntIterable
      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 int[] toArray()
      Description copied from interface: IntIterable
      Converts the IntIterable to a primitive int array.
      Specified by:
      toArray in interface IntIterable
    • toArray

      public int[] toArray(int[] target)
      Description copied from interface: IntIterable
      Converts the IntIterable to a primitive int 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 IntIterable
    • select

      public MutableIntBag select(IntPredicate predicate)
      Description copied from interface: IntIterable
      Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.
      Specified by:
      select in interface IntIterable
      Specified by:
      select in interface IntValuesMap
      Specified by:
      select in interface MutableIntValuesMap
    • reject

      public MutableIntBag reject(IntPredicate predicate)
      Description copied from interface: IntIterable
      Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.
      Specified by:
      reject in interface IntIterable
      Specified by:
      reject in interface IntValuesMap
      Specified by:
      reject in interface MutableIntValuesMap
    • collect

      public <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
      Description copied from interface: IntIterable
      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 IntIterable
      Specified by:
      collect in interface IntValuesMap
      Specified by:
      collect in interface MutableIntValuesMap
    • detectIfNone

      public int detectIfNone(IntPredicate predicate, int value)
      Specified by:
      detectIfNone in interface IntIterable
    • count

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

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

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

      public RichIterable<IntIterable> chunk(int size)
      Description copied from interface: IntIterable
      Partitions elements in fixed size chunks.
      Specified by:
      chunk in interface IntIterable
      Parameters:
      size - the number of elements per chunk
      Returns:
      A RichIterable containing IntIterables 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 IntIterable
    • containsValue

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

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