psdi.util

Class IndexedHashMap

  • java.lang.Object
    • java.util.AbstractMap
      • java.util.HashMap
        • java.util.LinkedHashMap
          • psdi.util.IndexedHashMap
  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map


    public class IndexedHashMap
    extends java.util.LinkedHashMap
    A LinkedHashMap that allows you to get the value by position/index. Use this if you want to avoid iterating thru the Map's Values Iterator.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry, java.util.AbstractMap.SimpleImmutableEntry
    • Constructor Summary

      Constructors 
      Constructor and Description
      IndexedHashMap() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean containsKey(java.lang.Object key) 
      java.lang.Object getIndexed(java.lang.Object idx) 
      java.lang.Object put(java.lang.Object idx, java.lang.Object key, java.lang.Object value) 
      • Methods inherited from class java.util.LinkedHashMap

        clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
      • Methods inherited from class java.util.HashMap

        clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • IndexedHashMap

        public IndexedHashMap()
    • Method Detail

      • put

        public java.lang.Object put(java.lang.Object idx,
                                    java.lang.Object key,
                                    java.lang.Object value)
      • getIndexed

        public java.lang.Object getIndexed(java.lang.Object idx)
      • containsKey

        public boolean containsKey(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map
        Overrides:
        containsKey in class java.util.HashMap