Interface IntIndexMap<E>

    • Method Detail

      • containsKey

        boolean containsKey​(int index)
        Determine whether the given index is contained in the map.
        Parameters:
        index - the index
        Returns:
        true if it is contained in the map
      • get

        E get​(int index)
        Get the value for the given index.
        Parameters:
        index - the index
        Returns:
        the corresponding value
      • removeKey

        E removeKey​(int index)
        Remove and return a value for the given index.
        Parameters:
        index - the index
        Returns:
        the value
      • put

        E put​(E value)
        Put a value into the map, replacing and returning any existing mapping.
        Parameters:
        value - the value to add
        Returns:
        the old value, or null if the old value was null or was not present
      • putIfAbsent

        E putIfAbsent​(E value)
        Put a value into the map if there is not already an existing mapping for it.
        Parameters:
        value - the value to add
        Returns:
        the existing value, if any, or null if the existing value was null or the value was added successfully
      • computeIfAbsent

        E computeIfAbsent​(int key,
                          IntFunction<E> producer)
        Compute a map value if no mapping exists.
        Parameters:
        key - the key
        producer - the producer which creates a new value
        Returns:
        the existing or new value
      • replace

        E replace​(E value)
        Put a value into the map only if there is an existing mapping for it.
        Parameters:
        value - the value to store
        Returns:
        the previous value (may be null) or null if there was no mapping to replace
      • replace

        boolean replace​(E oldValue,
                        E newValue)
        Replace an old value with a new value.
        Parameters:
        oldValue - the value to replace
        newValue - the value to replace with
        Returns:
        true if the replacement succeeded, or false if the old value was not present in the map