Package com.macrofocus.utils

# Interface IndexedNavigableMap<K,V>

All Superinterfaces:
  `Map<K,V>`, `NavigableMap<K,V>`, `SequencedMap<K,V>`, `SortedMap<K,V>`

All Known Implementing Classes:
  `IndexedTreeMap`

public interface IndexedNavigableMap<K,V> extends NavigableMap<K,V>
User: Vitaly Sazanovich Date: 07/02/13 Time: 19:28 Email: Vitaly.Sazanovich@gmail.com

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface java.util.Map

  `Map.Entry<K,V>`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map.Entry<K,V>`
  `exactEntry(int index)`
  Returns a key-value mapping associated with the key located at the index offset from the beginning of the sorted map
  `K`
  `exactKey(int index)`
  Returns the key located at the index offset from the beginning of the sorted map
  `int`
  `keyIndex(K k)`
  Searches the specified tree map for the specified key using the put algorithm.

  ### Methods inherited from interface java.util.Map

  `clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size`

  ### Methods inherited from interface java.util.NavigableMap

  `ceilingEntry, ceilingKey, descendingKeySet, descendingMap, firstEntry, floorEntry, floorKey, headMap, headMap, higherEntry, higherKey, lastEntry, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, reversed, subMap, subMap, tailMap, tailMap`

  ### Methods inherited from interface java.util.SequencedMap

  `sequencedEntrySet, sequencedKeySet, sequencedValues`

  ### Methods inherited from interface java.util.SortedMap

  `comparator, entrySet, firstKey, keySet, lastKey, putFirst, putLast, values`

- ## Method Details

  - ### exactKey

    K exactKey(int index)
    Returns the key located at the index offset from the beginning of the sorted map
    Parameters:
      `index` - index of the key
    Returns:
      the key `key` located at the index (@code index) offset from the beginning of the sorted map
    Throws:
      `ArrayIndexOutOfBoundsException` - if the specified index is less than 0 or greater than size-1

  - ### exactEntry

    Map.Entry<K,V> exactEntry(int index)
    Returns a key-value mapping associated with the key located at the index offset from the beginning of the sorted map
    Parameters:
      `index` - index of the key
    Returns:
      the entry with the key `key` located at the index (@code index) offset from the beginning of the sorted map
    Throws:
      `ArrayIndexOutOfBoundsException` - if the specified index is less than 0 or greater than size-1

  - ### keyIndex

    int keyIndex(K k)
    Searches the specified tree map for the specified key using the put algorithm. Calculates its offset from the beginning of the sorted map using weights.
    Parameters:
      `k` - the key
    Returns:
      index of the search key, if it is contained in the tree map; otherwise a NullPointerException is thrown
    Throws:
      `NullPointerException` - if the specified key is null or does not exist