Interface IndexedNavigableMap<K,​V>

  • All Superinterfaces:
    java.util.Map<K,​V>, java.util.NavigableMap<K,​V>, java.util.SortedMap<K,​V>
    All Known Implementing Classes:
    IndexedTreeMap

    public interface IndexedNavigableMap<K,​V>
    extends java.util.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

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.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, subMap, subMap, tailMap, tailMap
      • Methods inherited from interface java.util.SortedMap

        comparator, entrySet, firstKey, keySet, lastKey, values
    • Method Detail

      • 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:
        java.lang.ArrayIndexOutOfBoundsException - if the specified index is less than 0 or greater than size-1
      • exactEntry

        java.util.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:
        java.lang.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:
        java.lang.NullPointerException - if the specified key is null or does not exist