Interface IndexedReadOnlyStringMap

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getKeyAt​(int index)
      Viewing all key-value pairs as a sequence sorted by key, this method returns the key at the specified index, or null if the specified index is less than zero or greater or equal to the size of this collection.
      <V> V getValueAt​(int index)
      Viewing all key-value pairs as a sequence sorted by key, this method returns the value at the specified index, or null if the specified index is less than zero or greater or equal to the size of this collection.
      int indexOfKey​(String key)
      Viewing all key-value pairs as a sequence sorted by key, this method returns the index of the specified key in that sequence.
    • Method Detail

      • getKeyAt

        String getKeyAt​(int index)
        Viewing all key-value pairs as a sequence sorted by key, this method returns the key at the specified index, or null if the specified index is less than zero or greater or equal to the size of this collection.
        Parameters:
        index - the index of the key to return
        Returns:
        the key at the specified index or null
      • getValueAt

        <V> V getValueAt​(int index)
        Viewing all key-value pairs as a sequence sorted by key, this method returns the value at the specified index, or null if the specified index is less than zero or greater or equal to the size of this collection.
        Parameters:
        index - the index of the value to return
        Returns:
        the value at the specified index or null
      • indexOfKey

        int indexOfKey​(String key)
        Viewing all key-value pairs as a sequence sorted by key, this method returns the index of the specified key in that sequence. If the specified key is not found, this method returns (-(insertion point) - 1).
        Parameters:
        key - the key whose index in the ordered sequence of keys to return
        Returns:
        the index of the specified key or (-(insertion point) - 1) if the key is not found. The insertion point is defined as the point at which the key would be inserted into the array: the index of the first element in the range greater than the key, or size() if all elements are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.