java.lang.Object
io.qt.internal.QtJambiObject
io.qt.QtObject
io.qt.internal.QtJambiAbstractMultiMapObject<K,V>
io.qt.internal.QtJambiMultiHashObject<K,V>
io.qt.core.QMultiHash<K,V>
public class QMultiHash<K,V> extends QtJambiMultiHashObject<K,V> implements Cloneable
Java wrapper for Qt class QMultiHash
-
Nested Class Summary
-
Constructor Summary
Constructors Modifier Constructor Description QMultiHash(QMetaType.Type keyMetaType, QMetaType valueMetaType)
QMultiHash(QMetaType.Type keyMetaType, QMetaType.Type valueMetaType)
QMultiHash(QMetaType.Type keyMetaType, Class<V> valueType)
QMultiHash(QMetaType keyMetaType, QMetaType valueMetaType)
QMultiHash(QMetaType keyMetaType, QMetaType.Type valueMetaType)
QMultiHash(QMetaType keyMetaType, Class<V> valueType)
protected
QMultiHash(QtObject.QPrivateConstructor p)
QMultiHash(Class<K> keyType, QMetaType valueMetaType)
QMultiHash(Class<K> keyType, QMetaType.Type valueMetaType)
QMultiHash(Class<K> keyType, Class<V> valueType)
QMultiHash(Map<K,List<V>> other)
-
Method Summary
Modifier and Type Method Description protected QMapIterator<K,V>
begin()
int
capacity()
void
clear()
QMultiHash<K,V>
clone()
boolean
contains(K key)
boolean
contains(K key, V value)
boolean
containsKey(Object key)
boolean
containsValue(Object value)
int
count()
int
count(K key)
int
count(K key, V value)
protected QMapIterator<K,V>
end()
boolean
equals(Object other)
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.QMapIterator<K,V>
find(K key)
QMapIterator<K,V>
find(K key, V value)
List<V>
get(Object key)
int
hashCode()
void
insert(K key, V value)
boolean
isEmpty()
K
key(V value)
K
key(V value, K defaultKey)
List<K>
keys()
List<K>
keys(V value)
static <K, V> QMultiHash<K,V>
of(K k1, V v1)
Returns a QMultiHash containing a single mapping.static <K, V> QMultiHash<K,V>
of(K k1, V v1, K k2, V v2)
Returns a QMultiHash containing two mappings.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.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.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.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.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.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.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.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.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.List<V>
put(K key, List<V> values)
void
readFrom(QDataStream stream)
List<V>
remove(Object key)
int
removeAll(Object key)
int
removeAll(K key, V value)
void
replaceOne(K key, V value)
void
reserve(int size)
int
size()
V
take(K key)
List<K>
uniqueKeys()
void
unite(Map<? super K,? extends Collection<? super V>> other)
V
value(K key)
V
value(K key, V defaultValue)
Collection<List<V>>
values()
List<V>
values(K key)
void
writeTo(QDataStream stream)
Methods inherited from class io.qt.internal.QtJambiAbstractMultiMapObject
iterator, putAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Method Details
-
clone
-
begin
- Specified by:
begin
in classQtJambiAbstractMultiMapObject<K,V>
-
capacity
-
clear
-
contains
-
count
-
count
-
end
- Specified by:
end
in classQtJambiAbstractMultiMapObject<K,V>
-
find
-
insert
-
isEmpty
-
key
-
key
-
keys
- Specified by:
keys
in classQtJambiAbstractMultiMapObject<K,V>
-
keys
-
removeAll
-
reserve
-
size
-
take
-
uniqueKeys
-
unite
-
value
-
value
-
values
-
values
-
count
-
find
-
removeAll
-
replaceOne
-
contains
-
equals
Description copied from class:QtObject
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface. Otherwise it will return the result of calling the super class implementation. -
hashCode
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,V>
-
get
-
put
-
remove
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,V>
-
writeTo
-
readFrom
-
of
Returns a QMultiHash containing a single mapping.- Type Parameters:
K
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the mapping's keyv1
- the mapping's value- Returns:
- a
QMultiHash
containing the specified mapping - Throws:
NullPointerException
- if the key or the value isnull
-
of
Returns a QMultiHash containing two mappings.- Type Parameters:
K
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMultiHash containing three mappings.- Type Parameters:
K
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMultiHash containing four mappings.- Type Parameters:
K
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's valuek6
- the sixth mapping's keyv6
- the sixth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's valuek6
- the sixth mapping's keyv6
- the sixth mapping's valuek7
- the seventh mapping's keyv7
- the seventh mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's valuek6
- the sixth mapping's keyv6
- the sixth mapping's valuek7
- the seventh mapping's keyv7
- the seventh mapping's valuek8
- the eighth mapping's keyv8
- the eighth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's valuek6
- the sixth mapping's keyv6
- the sixth mapping's valuek7
- the seventh mapping's keyv7
- the seventh mapping's valuek8
- the eighth mapping's keyv8
- the eighth mapping's valuek9
- the ninth mapping's keyv9
- the ninth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
k1
- the first mapping's keyv1
- the first mapping's valuek2
- the second mapping's keyv2
- the second mapping's valuek3
- the third mapping's keyv3
- the third mapping's valuek4
- the fourth mapping's keyv4
- the fourth mapping's valuek5
- the fifth mapping's keyv5
- the fifth mapping's valuek6
- the sixth mapping's keyv6
- the sixth mapping's valuek7
- the seventh mapping's keyv7
- the seventh mapping's valuek8
- the eighth mapping's keyv8
- the eighth mapping's valuek9
- the ninth mapping's keyv9
- the ninth mapping's valuek10
- the tenth mapping's keyv10
- the tenth mapping's value- Returns:
- a
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMultiHash
's key typeV
- theQMultiHash
's value type- Parameters:
entries
-java.util.Map.Entry
s 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 isnull
, or if theentries
array isnull
-