Class LinkedHashTreeMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
com.google.gson.internal.LinkedHashTreeMap<K,V>
All Implemented Interfaces:
Serializable, Map<K,V>

public final class LinkedHashTreeMap<K,V> extends AbstractMap<K,V> implements Serializable
A map of comparable keys to values. Unlike TreeMap, this class uses insertion order for iteration order. Comparison order is only used as an optimization for efficient insertion and removal.

This implementation was derived from Android 4.1's TreeMap and LinkedHashMap classes.

See Also:
  • Constructor Details

    • LinkedHashTreeMap

      public LinkedHashTreeMap()
      Create a natural order, empty tree map whose keys must be mutually comparable and non-null.
    • LinkedHashTreeMap

      public LinkedHashTreeMap(Comparator<? super K> comparator)
      Create a tree map ordered by comparator. This map's keys may only be null if comparator permits.
      Parameters:
      comparator - the comparator to order elements with, or null to use the natural ordering.
  • Method Details