Class AbstractMutableDoubleValuesMap

java.lang.Object
org.eclipse.collections.impl.primitive.AbstractDoubleIterable
org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableDoubleValuesMap
All Implemented Interfaces:
DoubleIterable, DoubleValuesMap, MutableDoubleValuesMap, PrimitiveIterable
Direct Known Subclasses:
ByteDoubleHashMap, CharDoubleHashMap, DoubleDoubleHashMap, FloatDoubleHashMap, IntDoubleHashMap, LongDoubleHashMap, ShortDoubleHashMap

public abstract class AbstractMutableDoubleValuesMap extends AbstractDoubleIterable implements MutableDoubleValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.
Since:
6.0.
  • Constructor Details

    • AbstractMutableDoubleValuesMap

      public AbstractMutableDoubleValuesMap()
  • Method Details

    • getOccupiedWithData

      protected abstract int getOccupiedWithData()
    • getSentinelValues

      protected abstract AbstractMutableDoubleValuesMap.SentinelValues getSentinelValues()
    • setSentinelValuesNull

      protected abstract void setSentinelValuesNull()
    • getEmptyValue

      protected abstract double getEmptyValue()
    • getValueAtIndex

      protected abstract double getValueAtIndex(int index)
    • getTableSize

      protected abstract int getTableSize()
    • isNonSentinelAtIndex

      protected abstract boolean isNonSentinelAtIndex(int index)
    • addEmptyKeyValue

      protected void addEmptyKeyValue(double value)
    • removeEmptyKey

      protected void removeEmptyKey()
    • addRemovedKeyValue

      protected void addRemovedKeyValue(double value)
    • removeRemovedKey

      protected void removeRemovedKey()
    • contains

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

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

      public double max()
      Specified by:
      max in interface DoubleIterable
    • min

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

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

      public MutableDoubleBag select(DoublePredicate predicate)
      Description copied from interface: DoubleIterable
      Returns a new DoubleIterable with all of the elements in the DoubleIterable that return true for the specified predicate.
      Specified by:
      select in interface DoubleIterable
      Specified by:
      select in interface DoubleValuesMap
      Specified by:
      select in interface MutableDoubleValuesMap
    • reject

      public MutableDoubleBag reject(DoublePredicate predicate)
      Description copied from interface: DoubleIterable
      Returns a new DoubleIterable with all of the elements in the DoubleIterable that return false for the specified predicate.
      Specified by:
      reject in interface DoubleIterable
      Specified by:
      reject in interface DoubleValuesMap
      Specified by:
      reject in interface MutableDoubleValuesMap
    • collect

      public <V> MutableBag<V> collect(DoubleToObjectFunction<? extends V> function)
      Description copied from interface: DoubleIterable
      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 DoubleIterable
      Specified by:
      collect in interface DoubleValuesMap
      Specified by:
      collect in interface MutableDoubleValuesMap
    • detectIfNone

      public double detectIfNone(DoublePredicate predicate, double value)
      Specified by:
      detectIfNone in interface DoubleIterable
    • count

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

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

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

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

      public double sum()
      Specified by:
      sum in interface DoubleIterable
    • containsValue

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

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