Interface IndexedMap<K,​V>

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

    public interface IndexedMap<K,​V>
    extends java.util.Map<K,​V>
    The IndexedMap interface implements Map and several functions for dealing with its content via the index corresponding to their insertion order. The concept is similar to the LinkedHashMap, but affords the user a greater control over how the data is laid out when iterating over it.
    • 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> getByIndex​(int index)  
      int indexOf​(K key)  
      void moveElement​(int originalIndex, int newIndex)  
      V putByIndex​(K key, V value, int index)  
      java.util.Map.Entry<K,​V> removeByIndex​(int index)  
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Method Detail

      • indexOf

        int indexOf​(K key)
      • putByIndex

        V putByIndex​(K key,
                     V value,
                     int index)
      • getByIndex

        java.util.Map.Entry<K,​V> getByIndex​(int index)
      • removeByIndex

        java.util.Map.Entry<K,​V> removeByIndex​(int index)
      • moveElement

        void moveElement​(int originalIndex,
                         int newIndex)