Package org.jibx.util

Class InsertionOrderedMap

  • All Implemented Interfaces:
    Map

    public class InsertionOrderedMap
    extends Object
    implements Map
    Map with keys iterated in insertion order. This is similar to the Java 1.4 java.util.LinkedHashMap class, but compatible with earlier JVM versions. It also guarantees insertion ordering only for iterating through the key values, not for other iterations. This implementation is optimized for insert-only maps.
    • Constructor Detail

      • InsertionOrderedMap

        public InsertionOrderedMap()
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface Map
      • containsKey

        public boolean containsKey​(Object key)
        Specified by:
        containsKey in interface Map
      • containsValue

        public boolean containsValue​(Object value)
        Specified by:
        containsValue in interface Map
      • entrySet

        public Set entrySet()
        Specified by:
        entrySet in interface Map
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Map
      • keySet

        public Set keySet()
        Specified by:
        keySet in interface Map
      • putAll

        public void putAll​(Map t)
        Specified by:
        putAll in interface Map
      • size

        public int size()
        Specified by:
        size in interface Map
      • keyList

        public ArrayList keyList()
        Get list of keys in order added. The returned list is live, and will grow or shrink as pairs are added to or removed from the map.
        Returns:
        key list