Module qtjambi
Package io.qt.core

Class QMap<Key,T>

java.lang.Object
io.qt.QtObject
io.qt.core.QMap<Key,T>
All Implemented Interfaces:
QtObjectInterface, Cloneable, Iterable<QPair<Key,T>>, Map<Key,T>, NavigableMap<Key,T>, SortedMap<Key,T>

public class QMap<Key,T> extends QtObject implements NavigableMap<Key,T>, Cloneable

Java wrapper for Qt class QMap

  • Constructor Details

    • QMap

      public QMap(Class<Key> keyType, QMetaType.Type valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyType - the type K
      valueMetaType - the type V
    • QMap

      public QMap(QMetaType.Type keyMetaType, Class<T> valueType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueType - the type V
    • QMap

      public QMap(QMetaType.Type keyMetaType, QMetaType valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueMetaType - the type V
    • QMap

      public QMap(QMetaType keyMetaType, QMetaType.Type valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueMetaType - the type V
    • QMap

      public QMap(QMetaType.Type keyMetaType, QMetaType.Type valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueMetaType - the type V
    • QMap

      public QMap(Class<Key> keyType, Class<T> valueType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyType - the type K
      valueType - the type V
    • QMap

      public QMap(Map<Key,T> other)
      Creating a container with given content.

      See QMap::QMap(const QMap<Key, T> &)

      Parameters:
      other - map
    • QMap

      public QMap(Class<Key> keyType, QMetaType valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyType - the type K
      valueMetaType - the type V
    • QMap

      public QMap(QMetaType keyMetaType, Class<T> valueType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueType - the type V
    • QMap

      public QMap(QMetaType keyMetaType, QMetaType valueMetaType)
      Creating a container with given key and value type.

      See QMap::QMap()

      Parameters:
      keyMetaType - the type K
      valueMetaType - the type V
  • Method Details

    • createVariantMap

      public static QMap<String,Object> createVariantMap()
      Creating a QMap with QVariant type (QMap<QString,QVariant>).

      See QMap::QMap()

    • clone

      public QMap<Key,T> clone()
      Creates and returns a copy of this object.

      See QMap::QMap(const QMap<Key, T> &)

    • clear

      @QtUninvokable public final void clear()
      Specified by:
      clear in interface Map<Key,T>
    • contains

      @QtUninvokable public final boolean contains(Key key)
    • count

      @QtUninvokable public final int count()
    • count

      @QtUninvokable public final int count(Key key)
    • begin

      @QtUninvokable protected final QAssociativeIterator<Key,T> begin()
      Provides a mutable C++ iterator to the containers begin.

      See QMap::begin()

      Returns:
      begin
    • end

      @QtUninvokable protected final QAssociativeIterator<Key,T> end()
      Provides a mutable C++ iterator to the containers end.

      See QMap::end()

      Returns:
      end
    • constBegin

      @QtUninvokable protected final QAssociativeConstIterator<Key,T> constBegin()
      Provides a constant C++ iterator to the containers begin.

      See QMap::constBegin()const

      Returns:
      begin
    • constEnd

      @QtUninvokable protected final QAssociativeConstIterator<Key,T> constEnd()
      Provides a constant C++ iterator to the containers end.

      See QMap::constEnd()const

      Returns:
      end
    • find

      @QtUninvokable public final QAssociativeConstIterator<Key,T> find(Key key)
      Returns:
      iterator
    • first

      @QtUninvokable public final T first()
    • firstKey

      @QtUninvokable public final Key firstKey()
      Specified by:
      firstKey in interface SortedMap<Key,T>
    • insert

      @QtUninvokable public final void insert(Key key, T value)
    • isEmpty

      @QtUninvokable public final boolean isEmpty()
      Specified by:
      isEmpty in interface Map<Key,T>
      Returns:
      true if this container contains no elements
    • key

      @QtUninvokable public final Key key(T value)
    • key

      @QtUninvokable public final Key key(T value, Key defaultKey)
    • keys

      @QtUninvokable public final QList<Key> keys()
      Returns a List of the keys contained in this associative container.

      See QMap::keys()const

      Returns:
      list of keys
    • keys

      @QtUninvokable public final QList<Key> keys(T value)
    • last

      @QtUninvokable public final T last()
    • lastKey

      @QtUninvokable public final Key lastKey()
      Specified by:
      lastKey in interface SortedMap<Key,T>
    • lowerBound

      @QtUninvokable public final QAssociativeConstIterator<Key,T> lowerBound(Key key)
    • removeIf

      @QtUninvokable public final int removeIf(Predicate<Key> predicate)
    • removeIf

      @QtUninvokable public final int removeIf(BiPredicate<Key,T> predicate)
    • removeAll

      @QtUninvokable public final int removeAll(Object key)
    • size

      @QtUninvokable public final int size()
      Specified by:
      size in interface Map<Key,T>
      Returns:
      the number of elements in this container
    • take

      @QtUninvokable public final T take(Key key)
    • upperBound

      @QtUninvokable public final QAssociativeConstIterator<Key,T> upperBound(Key key)
    • value

      @QtUninvokable public final T value(Key key)
    • value

      @QtUninvokable public final T value(Key key, T defaultValue)
    • values

      @QtUninvokable public final QList<T> values()
      Specified by:
      values in interface Map<Key,T>
      Specified by:
      values in interface SortedMap<Key,T>
    • equals

      @QtUninvokable public boolean equals(Object other)
      Specified by:
      equals in interface Map<Key,T>
      Overrides:
      equals in class QtObject
      Parameters:
      other - other object
      Returns:
      true if the native counterpart of the two objects are one and the same.
    • hashCode

      @QtUninvokable public int hashCode()
      Returns the objects's hash code computed by qHash(QMap<Key,T>).
      Specified by:
      hashCode in interface Map<Key,T>
      Overrides:
      hashCode in class Object
    • toString

      @QtUninvokable public String toString()
      Returns the string representation of the object given by QVariant(this).toString().
      Returns:
      String
    • comparator

      @QtUninvokable public final Comparator<Key> comparator()
      Returns the maps comparator.
      Specified by:
      comparator in interface SortedMap<Key,T>
    • containsKey

      @QtUninvokable public final boolean containsKey(Object key)
      Returns true if this map contains a mapping for the specified key.
      Specified by:
      containsKey in interface Map<Key,T>
      See Also:
    • get

      @QtUninvokable public final T get(Object key)
      Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
      Specified by:
      get in interface Map<Key,T>
      See Also:
    • put

      @QtUninvokable public final T put(Key key, T value)
      Associates the specified value with the specified key in this map.
      Specified by:
      put in interface Map<Key,T>
      See Also:
    • remove

      @QtUninvokable public final T remove(Object key)
      Removes the mapping for a key from this map if it is present.
      Specified by:
      remove in interface Map<Key,T>
      See Also:
    • containsValue

      @QtUninvokable public final boolean containsValue(Object value)
      Returns true if this map maps one or more keys to the specified value.
      Specified by:
      containsValue in interface Map<Key,T>
      See Also:
    • writeTo

      @QtUninvokable public void writeTo(QDataStream stream)
    • readFrom

      @QtUninvokable public void readFrom(QDataStream stream)
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1)
      Returns a QMap containing a single mapping.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the mapping's key
      t1 - the mapping's value
      Returns:
      a QMap containing the specified mapping
      Throws:
      NullPointerException - if the key or the value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2)
      Returns a QMap containing two mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3)
      Returns a QMap containing three mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4)
      Returns a QMap containing four mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5)
      Returns a QMap containing five mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6)
      Returns a QMap containing six mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7)
      Returns a QMap containing seven mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8)
      Returns a QMap containing eight mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9)
      Returns a QMap containing nine mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <Key, T> QMap<Key,T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9, Key k10, T t10)
      Returns a QMap containing ten mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      k10 - the tenth mapping's key
      t10 - the tenth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1)
      Returns a QMap containing a single mapping.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the mapping's key
      t1 - the mapping's value
      Returns:
      a QMap containing the specified mapping
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2)
      Returns a QMap containing two mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3)
      Returns a QMap containing three mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4)
      Returns a QMap containing four mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5)
      Returns a QMap containing five mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6)
      Returns a QMap containing six mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7)
      Returns a QMap containing seven mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8)
      Returns a QMap containing eight mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9)
      Returns a QMap containing nine mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9, Key k10, T t10)
      Returns a QMap containing ten mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      k10 - the tenth mapping's key
      t10 - the tenth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1)
      Returns a QMap containing a single mapping.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the mapping's key
      t1 - the mapping's value
      Returns:
      a QMap containing the specified mapping
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2)
      Returns a QMap containing two mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3)
      Returns a QMap containing three mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4)
      Returns a QMap containing four mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5)
      Returns a QMap containing five mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6)
      Returns a QMap containing six mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7)
      Returns a QMap containing seven mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8)
      Returns a QMap containing eight mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9)
      Returns a QMap containing nine mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofTyped

      public static <Key, T> QMap<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4, Key k5, T t5, Key k6, T t6, Key k7, T t7, Key k8, T t8, Key k9, T t9, Key k10, T t10)
      Returns a QMap containing ten mappings.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      k1 - the first mapping's key
      t1 - the first mapping's value
      k2 - the second mapping's key
      t2 - the second mapping's value
      k3 - the third mapping's key
      t3 - the third mapping's value
      k4 - the fourth mapping's key
      t4 - the fourth mapping's value
      k5 - the fifth mapping's key
      t5 - the fifth mapping's value
      k6 - the sixth mapping's key
      t6 - the sixth mapping's value
      k7 - the seventh mapping's key
      t7 - the seventh mapping's value
      k8 - the eighth mapping's key
      t8 - the eighth mapping's value
      k9 - the ninth mapping's key
      t9 - the ninth mapping's value
      k10 - the tenth mapping's key
      t10 - the tenth mapping's value
      Returns:
      a QMap containing the specified mappings
    • ofEntries

      @SafeVarargs public static <Key, T> QMap<Key,T> ofEntries(Map.Entry<? extends Key,? extends T> entry0, Map.Entry<? extends Key,? extends T> ... entries)
      Returns a QMap containing keys and values extracted from the given entries.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      entries - java.util.Map.Entrys containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any entry, key, or value is null, or if the entries array is null
    • ofTypedEntries

      @SafeVarargs public static <Key, T> QMap<Key,T> ofTypedEntries(Class<Key> keyType, Class<T> valueType, Map.Entry<? extends Key,? extends T>... entries)
      Returns a QMap containing keys and values extracted from the given entries.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      entries - java.util.Map.Entrys containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any entry, key, or value is null, or if the entries array is null
    • ofTypedEntries

      @SafeVarargs public static <Key, T> QMap<Key,T> ofTypedEntries(QMetaType keyType, QMetaType valueType, Map.Entry<? extends Key,? extends T>... entries)
      Returns a QMap containing keys and values extracted from the given entries.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      keyType - key type
      valueType - value type
      entries - java.util.Map.Entrys containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any entry, key, or value is null, or if the entries array is null
    • ofPairs

      @SafeVarargs public static <Key, T> QMap<Key,T> ofPairs(QPair<? extends Key,? extends T> pair0, QPair<? extends Key,? extends T> ... pairs)
      Returns a QMap containing keys and values extracted from the given pairs.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      pairs - QPairs containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any pair, key, or value is null, or if the pairs array is null
    • ofTypedPairs

      @SafeVarargs public static <Key, T> QMap<Key,T> ofTypedPairs(Class<Key> keyType, Class<T> valueType, QPair<? extends Key,? extends T>... pairs)
      Returns a QMap containing keys and values extracted from the given pairs.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      pairs - QPairs containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any pair, key, or value is null, or if the pairs array is null
    • ofTypedPairs

      @SafeVarargs public static <Key, T> QMap<Key,T> ofTypedPairs(QMetaType keyType, QMetaType valueType, QPair<? extends Key,? extends T>... pairs)
      Returns a QMap containing keys and values extracted from the given pairs.
      Type Parameters:
      Key - the QMap's key type
      T - the QMap's value type
      Parameters:
      pairs - QPairs containing the keys and values from which the map is populated
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any pair, key, or value is null, or if the pairs array is null
    • subMap

      @QtUninvokable public final NavigableMap<Key,T> subMap(Key fromKey, Key toKey)

      Equivalent to subMap(fromKey, true, toKey, false).

      Specified by:
      subMap in interface NavigableMap<Key,T>
      Specified by:
      subMap in interface SortedMap<Key,T>
      See Also:
    • headMap

      @QtUninvokable public final NavigableMap<Key,T> headMap(Key toKey)

      Equivalent to headMap(toKey, false).

      Specified by:
      headMap in interface NavigableMap<Key,T>
      Specified by:
      headMap in interface SortedMap<Key,T>
      See Also:
    • tailMap

      @QtUninvokable public final NavigableMap<Key,T> tailMap(Key fromKey)

      Equivalent to tailMap(fromKey, true).

      Specified by:
      tailMap in interface NavigableMap<Key,T>
      Specified by:
      tailMap in interface SortedMap<Key,T>
      See Also:
    • lowerEntry

      @QtUninvokable public final Map.Entry<Key,T> lowerEntry(Key key)
      Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.
      Specified by:
      lowerEntry in interface NavigableMap<Key,T>
      See Also:
    • lowerKey

      @QtUninvokable public final Key lowerKey(Key key)
      Returns the greatest key strictly less than the given key, or null if there is no such key.
      Specified by:
      lowerKey in interface NavigableMap<Key,T>
      See Also:
    • floorEntry

      @QtUninvokable public final Map.Entry<Key,T> floorEntry(Key key)
      Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.
      Specified by:
      floorEntry in interface NavigableMap<Key,T>
      See Also:
    • floorKey

      @QtUninvokable public final Key floorKey(Key key)
      Returns the greatest key less than or equal to the given key, or null if there is no such key.
      Specified by:
      floorKey in interface NavigableMap<Key,T>
      See Also:
    • ceilingEntry

      @QtUninvokable public final Map.Entry<Key,T> ceilingEntry(Key key)
      Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key.
      Specified by:
      ceilingEntry in interface NavigableMap<Key,T>
      See Also:
    • ceilingKey

      @QtUninvokable public final Key ceilingKey(Key key)
      Returns the least key greater than or equal to the given key, or null if there is no such key.
      Specified by:
      ceilingKey in interface NavigableMap<Key,T>
      See Also:
    • higherEntry

      @QtUninvokable public final Map.Entry<Key,T> higherEntry(Key key)
      Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.
      Specified by:
      higherEntry in interface NavigableMap<Key,T>
      See Also:
    • higherKey

      @QtUninvokable public final Key higherKey(Key key)
      Returns the least key strictly greater than the given key, or null if there is no such key.
      Specified by:
      higherKey in interface NavigableMap<Key,T>
      See Also:
    • firstEntry

      @QtUninvokable public final Map.Entry<Key,T> firstEntry()
      Returns a key-value mapping associated with the least key in this map, or null if the map is empty.
      Specified by:
      firstEntry in interface NavigableMap<Key,T>
      See Also:
    • lastEntry

      @QtUninvokable public final Map.Entry<Key,T> lastEntry()
      Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
      Specified by:
      lastEntry in interface NavigableMap<Key,T>
      See Also:
    • pollFirstEntry

      @QtUninvokable public final Map.Entry<Key,T> pollFirstEntry()
      Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.
      Specified by:
      pollFirstEntry in interface NavigableMap<Key,T>
      See Also:
    • pollLastEntry

      @QtUninvokable public final Map.Entry<Key,T> pollLastEntry()
      Removes and returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.
      Specified by:
      pollLastEntry in interface NavigableMap<Key,T>
      See Also:
    • descendingMap

      @QtUninvokable public final NavigableMap<Key,T> descendingMap()
      Returns a reverse order view of the mappings contained in this map.
      Specified by:
      descendingMap in interface NavigableMap<Key,T>
      See Also:
    • descendingKeySet

      @QtUninvokable public final NavigableSet<Key> descendingKeySet()
      Returns a reverse order NavigableSet view of the keys contained in this map. The set's iterator returns the keys in descending order.
      Specified by:
      descendingKeySet in interface NavigableMap<Key,T>
      See Also:
    • subMap

      @QtUninvokable public final QMap<Key,T> subMap(Key fromKey, boolean fromInclusive, Key toKey, boolean toInclusive)
      Returns a copy of the portion of this map whose keys range from fromKey to toKey. If fromKey and toKey are equal, the returned map is empty unless fromInclusive and toInclusive are both true.
      Specified by:
      subMap in interface NavigableMap<Key,T>
    • headMap

      @QtUninvokable public final QMap<Key,T> headMap(Key toKey, boolean inclusive)
      Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey.
      Specified by:
      headMap in interface NavigableMap<Key,T>
    • tailMap

      @QtUninvokable public final QMap<Key,T> tailMap(Key fromKey, boolean inclusive)
      Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey.
      Specified by:
      tailMap in interface NavigableMap<Key,T>
    • assign

      @QtUninvokable public final void assign(QMap<Key,T> other)

      See QMap::operator=(QMap<Key,T>)

    • swap

      @QtUninvokable public final void swap(QMap<Key,T> other)

      See QMap::swap(QMap<Key,T>&)

    • isSharedWith

      @QtUninvokable public final boolean isSharedWith(QMap<?,?> other)
      Returns true if both containers share the same data.
    • isDetached

      @QtUninvokable public final boolean isDetached()
      Returns true if container is not shared.
    • detach

      @QtUninvokable public final void detach()
      Detached the container if it is shared.
    • putAll

      @QtUninvokable public final void putAll(Map<? extends Key,? extends T> m)
      Copies all of the mappings from the specified map to this map.
      Specified by:
      putAll in interface Map<Key,T>
    • iterator

      @QtUninvokable public final Iterator<QPair<Key,T>> iterator()
      Returns an iterator over elements of type QPair<K,V>.
      Specified by:
      iterator in interface Iterable<Key>
      Returns:
      an Iterator
    • entrySet

      @QtUninvokable public final Set<Map.Entry<Key,T>> entrySet()
      Returns a Set view of the mappings contained in this map.
      Specified by:
      entrySet in interface Map<Key,T>
    • keySet

      @QtUninvokable public final Set<Key> keySet()
      Returns a Set view of the keys contained in this map.
      Specified by:
      keySet in interface Map<Key,T>