Class AbstractMutableIntValuesMap

    • Constructor Detail

      • AbstractMutableIntValuesMap

        public AbstractMutableIntValuesMap()
    • Method Detail

      • getOccupiedWithData

        protected abstract int getOccupiedWithData()
      • setSentinelValuesNull

        protected abstract void setSentinelValuesNull()
      • getEmptyValue

        protected abstract int getEmptyValue()
      • getValueAtIndex

        protected abstract int getValueAtIndex​(int index)
      • getTableSize

        protected abstract int getTableSize()
      • isNonSentinelAtIndex

        protected abstract boolean isNonSentinelAtIndex​(int index)
      • addEmptyKeyValue

        protected void addEmptyKeyValue​(int value)
      • removeEmptyKey

        protected void removeEmptyKey()
      • addRemovedKeyValue

        protected void addRemovedKeyValue​(int value)
      • removeRemovedKey

        protected void removeRemovedKey()
      • 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
      • 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
      • 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.