Module qtjambi
Package io.qt.core

Class QMultiHash<K,V>

java.lang.Object
io.qt.QtObject
io.qt.internal.AbstractMultiAssociativeContainer<K,V>
io.qt.internal.AbstractMultiHash<K,V>
io.qt.core.QMultiHash<K,V>
All Implemented Interfaces:
QtObjectInterface, Cloneable, Iterable<QPair<K,V>>, Map<K,List<V>>

public class QMultiHash<K,V> extends io.qt.internal.AbstractMultiHash<K,V> implements Cloneable

Java wrapper for Qt class QMultiHash

  • Constructor Details

  • Method Details

    • clone

      public QMultiHash<K,V> clone()
      Overrides:
      clone in class Object
    • capacity

      @QtUninvokable public final int capacity()
    • 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.AbstractMultiAssociativeContainer<K,V>
    • end

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

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

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

      @QtUninvokable public final QAssociativeConstIterator<K,V> find(K key)
    • 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.AbstractMultiAssociativeContainer<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.AbstractMultiAssociativeContainer<K,V>
    • keys

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

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

      @QtUninvokable public final void reserve(int size)
    • size

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

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

      @QtUninvokable public final List<K> uniqueKeys()
    • unite

      @QtUninvokable public final void unite(Map<? super K,? extends Collection<? super V>> other)
    • value

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

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

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

      @QtUninvokable public final List<V> values(K key)
    • count

      @QtUninvokable public final int count(K key, V value)
    • find

      @QtUninvokable public final QAssociativeConstIterator<K,V> find(K key, V value)
    • removeAll

      @QtUninvokable public final int removeAll(K key, V value)
    • replaceOne

      @QtUninvokable public final void replaceOne(K key, V value)
    • contains

      @QtUninvokable public final boolean contains(K key, V value)
    • 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.AbstractMultiAssociativeContainer<K,V>
    • containsKey

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

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

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

      @QtUninvokable public final List<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> QMultiHash<K,V> of(K k1, V v1)
      Returns a QMultiHash containing a single mapping.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash's value type
      Parameters:
      k1 - the mapping's key
      v1 - the mapping's value
      Returns:
      a QMultiHash containing the specified mapping
      Throws:
      NullPointerException - if the key or the value is null
    • of

      public static <K, V> QMultiHash<K,V> of(K k1, V v1, K k2, V v2)
      Returns a QMultiHash containing two mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3)
      Returns a QMultiHash containing three mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<K,V> of(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4)
      Returns a QMultiHash containing four mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing five mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing six mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing seven mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing eight mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing nine mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • of

      public static <K, V> QMultiHash<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 QMultiHash containing ten mappings.
      Type Parameters:
      K - the QMultiHash's key type
      V - the QMultiHash'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 QMultiHash containing the specified mappings
      Throws:
      NullPointerException - if any key or value is null
    • ofEntries

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