Class AbstractMutableShortValuesMap

    • Constructor Detail

      • AbstractMutableShortValuesMap

        public AbstractMutableShortValuesMap()
    • Method Detail

      • getOccupiedWithData

        protected abstract int getOccupiedWithData()
      • setSentinelValuesNull

        protected abstract void setSentinelValuesNull()
      • getEmptyValue

        protected abstract short getEmptyValue()
      • getValueAtIndex

        protected abstract short getValueAtIndex​(int index)
      • getTableSize

        protected abstract int getTableSize()
      • isNonSentinelAtIndex

        protected abstract boolean isNonSentinelAtIndex​(int index)
      • addEmptyKeyValue

        protected void addEmptyKeyValue​(short value)
      • removeEmptyKey

        protected void removeEmptyKey()
      • addRemovedKeyValue

        protected void addRemovedKeyValue​(short value)
      • removeRemovedKey

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