Module qtjambi
Package io.qt.core

Class QMap<K,V>

java.lang.Object
io.qt.QtObject
io.qt.internal.AbstractAssociativeContainer<K,V>
io.qt.internal.AbstractMap<K,V>
io.qt.core.QMap<K,V>
All Implemented Interfaces:
QtObjectInterface, Cloneable, Iterable<QPair<K,V>>, Map<K,V>, NavigableMap<K,V>, SortedMap<K,V>

public class QMap<K,V> extends io.qt.internal.AbstractMap<K,V> implements Cloneable

Java wrapper for Qt class QMap

  • Constructor Details

  • Method Details

    • createVariantMap

      public static QMap<String,Object> createVariantMap()
    • clone

      public QMap<K,V> clone()
      Overrides:
      clone in class Object
    • clear

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

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

      @QtUninvokable public final int count()
    • count

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

      @QtUninvokable protected final QAssociativeIterator<K,V> begin()
      Specified by:
      begin in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • end

      @QtUninvokable protected final QAssociativeIterator<K,V> end()
      Specified by:
      end in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • constBegin

      @QtUninvokable protected final QAssociativeConstIterator<K,V> constBegin()
      Specified by:
      constBegin in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • constEnd

      @QtUninvokable protected final QAssociativeConstIterator<K,V> constEnd()
      Specified by:
      constEnd in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • find

      @QtUninvokable public final QAssociativeConstIterator<K,V> find(K key)
      Specified by:
      find in class io.qt.internal.AbstractMap<K,V>
    • first

      @QtUninvokable public final V first()
    • firstKey

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

      @QtUninvokable public final void insert(K key, V value)
    • isEmpty

      @QtUninvokable public final boolean isEmpty()
      Specified by:
      isEmpty in interface Map<K,V>
      Specified by:
      isEmpty in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • key

      @QtUninvokable public final K key(V value)
    • key

      @QtUninvokable public final K key(V value, K defaultKey)
    • keys

      @QtUninvokable public final List<K> keys()
      Specified by:
      keys in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • keys

      @QtUninvokable public final List<K> keys(V value)
    • last

      @QtUninvokable public final V last()
    • lastKey

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

      @QtUninvokable public final QAssociativeConstIterator<K,V> lowerBound(K key)
      Specified by:
      lowerBound in class io.qt.internal.AbstractMap<K,V>
    • removeAll

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

      @QtUninvokable public final int size()
      Specified by:
      size in interface Map<K,V>
      Specified by:
      size in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • take

      @QtUninvokable public final V take(K key)
    • upperBound

      @QtUninvokable public final QAssociativeConstIterator<K,V> upperBound(K key)
      Specified by:
      upperBound in class io.qt.internal.AbstractMap<K,V>
    • value

      @QtUninvokable public final V value(K key)
    • value

      @QtUninvokable public final V value(K key, V defaultValue)
    • values

      @QtUninvokable public final List<V> values()
      Specified by:
      values in interface Map<K,V>
      Specified by:
      values in interface SortedMap<K,V>
    • equals

      @QtUninvokable public boolean equals(Object other)
      Description copied from class: QtObject
      Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical. Qt value types override this method to make a value comparison. Otherwise it will return the result of calling the super class implementation.
      Specified by:
      equals in interface Map<K,V>
      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()
      Specified by:
      hashCode in interface Map<K,V>
      Overrides:
      hashCode in class Object
    • toString

      @QtUninvokable public String toString()
      Overrides:
      toString in class io.qt.internal.AbstractAssociativeContainer<K,V>
    • comparator

      @QtUninvokable public final Comparator<K> comparator()
      Specified by:
      comparator in interface SortedMap<K,V>
    • containsKey

      @QtUninvokable public final boolean containsKey(Object key)
      Specified by:
      containsKey in interface Map<K,V>
    • get

      @QtUninvokable public final V get(Object key)
      Specified by:
      get in interface Map<K,V>
    • put

      @QtUninvokable public final V put(K key, V value)
      Specified by:
      put in interface Map<K,V>
    • remove

      @QtUninvokable public final V remove(Object key)
      Specified by:
      remove in interface Map<K,V>
    • containsValue

      @QtUninvokable public final boolean containsValue(Object value)
      Specified by:
      containsValue in interface Map<K,V>
    • writeTo

      @QtUninvokable public void writeTo(QDataStream stream)
    • readFrom

      @QtUninvokable public void readFrom(QDataStream stream)
    • of

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

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

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

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
      Returns a QMap containing four mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5)
      Returns a QMap containing five mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6)
      Returns a QMap containing six mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7)
      Returns a QMap containing seven mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8)
      Returns a QMap containing eight mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9)
      Returns a QMap containing nine mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      k9 - the ninth mapping's key
      v9 - the ninth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMap<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10)
      Returns a QMap containing ten mappings.
      Type Parameters:
      K - the QMap's key type
      V - the QMap's value type
      Parameters:
      k1 - the first mapping's key
      v1 - the first mapping's value
      k2 - the second mapping's key
      v2 - the second mapping's value
      k3 - the third mapping's key
      v3 - the third mapping's value
      k4 - the fourth mapping's key
      v4 - the fourth mapping's value
      k5 - the fifth mapping's key
      v5 - the fifth mapping's value
      k6 - the sixth mapping's key
      v6 - the sixth mapping's value
      k7 - the seventh mapping's key
      v7 - the seventh mapping's value
      k8 - the eighth mapping's key
      v8 - the eighth mapping's value
      k9 - the ninth mapping's key
      v9 - the ninth mapping's value
      k10 - the tenth mapping's key
      v10 - the tenth mapping's value
      Returns:
      a QMap containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • ofEntries

      @SafeVarargs public static <K, V> QMap<K,V> ofEntries(Map.Entry<? extends K,? extends V> entry0, Map.Entry<? extends K,? extends V>... entries)
      Returns a QMap containing keys and values extracted from the given entries.
      Type Parameters:
      K - the QMap's key type
      V - 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