Class AbstractMutableLongValuesMap

    • Constructor Detail

      • AbstractMutableLongValuesMap

        public AbstractMutableLongValuesMap()
    • Method Detail

      • getOccupiedWithData

        protected abstract int getOccupiedWithData()
      • setSentinelValuesNull

        protected abstract void setSentinelValuesNull()
      • getEmptyValue

        protected abstract long getEmptyValue()
      • getValueAtIndex

        protected abstract long getValueAtIndex​(int index)
      • getTableSize

        protected abstract int getTableSize()
      • isNonSentinelAtIndex

        protected abstract boolean isNonSentinelAtIndex​(int index)
      • addEmptyKeyValue

        protected void addEmptyKeyValue​(long value)
      • removeEmptyKey

        protected void removeEmptyKey()
      • addRemovedKeyValue

        protected void addRemovedKeyValue​(long value)
      • removeRemovedKey

        protected void removeRemovedKey()
      • contains

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

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

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

        public long[] toArray​(long[] target)
        Description copied from interface: LongIterable
        Converts the LongIterable to a primitive long 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 LongIterable
      • count

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

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

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

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

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

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