java.lang.Object
io.qt.QtObject
io.qt.core.QHash<Key,T>
- All Implemented Interfaces:
QtObjectInterface,Cloneable,Iterable<QPair<Key,,T>> Map<Key,T>
Java wrapper for Qt class QHash
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCreating a container with given key and value type.QHash(QMetaType keyMetaType, QMetaType.Type valueMetaType) Creating a container with given key and value type.Creating a container with given key and value type.QHash(QMetaType.Type keyMetaType, QMetaType valueMetaType) Creating a container with given key and value type.QHash(QMetaType.Type keyMetaType, QMetaType.Type valueMetaType) Creating a container with given key and value type.QHash(QMetaType.Type keyMetaType, Class<T> valueType) Creating a container with given key and value type.Creating a container with given key and value type.QHash(Class<Key> keyType, QMetaType.Type valueMetaType) Creating a container with given key and value type.Creating a container with given key and value type.Creating a container with given content. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidSeeQHash::operator=(QHash<Key,T>) protected final QAssociativeIterator<Key,T> begin()Provides a mutable C++ iterator to the containers begin.final intcapacity()final voidclear()SeeQHash::clear() clone()Creates and returns a copy of this object.protected final QAssociativeConstIterator<Key,T> Provides a constant C++ iterator to the containers begin.protected final QAssociativeConstIterator<Key,T> constEnd()Provides a constant C++ iterator to the containers end.final booleanfinal booleancontainsKey(Object key) Returnstrueif this map contains a mapping for the specified key.final booleancontainsValue(Object value) Returnstrueif this map maps one or more keys to the specified value.final intcount()final intCreating a QHash with QVariant type (QHash<QString,QVariant>).final voiddetach()Detached the container if it is shared.protected final QAssociativeIterator<Key,T> end()Provides a mutable C++ iterator to the containers end.entrySet()Returns aSetview of the mappings contained in this map.booleanfinal QAssociativeConstIterator<Key,T> final TReturns the value to which the specified key is mapped, ornullif this map contains no mapping for the key.inthashCode()Returns the objects's hash code computed byqHash(QHash<Key,T>).final voidfinal booleanReturns true if container is not shared.final booleanisEmpty()final booleanisSharedWith(QHash<?, ?> other) Returns true of both containers share the same data.iterator()Returns an iterator over elements of typeQPair<K,V>.final Keyfinal Keykeys()Returns aListof the keys contained in this associative container.keySet()Returns aSetview of the keys contained in this map.static <Key,T> QHash<Key, T> of(Key k1, T t1) Returns a QHash containing a single mapping.static <Key,T> QHash<Key, T> of(Key k1, T t1, Key k2, T t2) Returns a QHash containing two mappings.static <Key,T> QHash<Key, T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3) Returns a QHash containing three mappings.static <Key,T> QHash<Key, T> of(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4) Returns a QHash containing four mappings.static <Key,T> QHash<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 QHash containing five mappings.static <Key,T> QHash<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 QHash containing six mappings.static <Key,T> QHash<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 QHash containing seven mappings.static <Key,T> QHash<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 QHash containing eight mappings.static <Key,T> QHash<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 QHash containing nine mappings.static <Key,T> QHash<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 QHash containing ten mappings.static <Key,T> QHash<Key, T> ofEntries(Map.Entry<? extends Key, ? extends T> entry0, Map.Entry<? extends Key, ? extends T> ... entries) Returns a QHash containing keys and values extracted from the given entries.static <Key,T> QHash<Key, T> Returns a QHash containing keys and values extracted from the given pairs.static <Key,T> QHash<Key, T> Returns a QHash containing a single mapping.static <Key,T> QHash<Key, T> Returns a QHash containing two mappings.static <Key,T> QHash<Key, T> Returns a QHash containing three mappings.static <Key,T> QHash<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 QHash containing four mappings.static <Key,T> QHash<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 QHash containing five mappings.static <Key,T> QHash<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 QHash containing six mappings.static <Key,T> QHash<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 QHash containing seven mappings.static <Key,T> QHash<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 QHash containing eight mappings.static <Key,T> QHash<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 QHash containing nine mappings.static <Key,T> QHash<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 QHash containing ten mappings.static <Key,T> QHash<Key, T> Returns a QHash containing a single mapping.static <Key,T> QHash<Key, T> Returns a QHash containing two mappings.static <Key,T> QHash<Key, T> Returns a QHash containing three mappings.static <Key,T> QHash<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 QHash containing four mappings.static <Key,T> QHash<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 QHash containing five mappings.static <Key,T> QHash<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 QHash containing six mappings.static <Key,T> QHash<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 QHash containing seven mappings.static <Key,T> QHash<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 QHash containing eight mappings.static <Key,T> QHash<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 QHash containing nine mappings.static <Key,T> QHash<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 QHash containing ten mappings.static <Key,T> QHash<Key, T> ofTypedEntries(QMetaType keyType, QMetaType valueType, Map.Entry<? extends Key, ? extends T>... entries) Returns a QHash containing keys and values extracted from the given entries.static <Key,T> QHash<Key, T> ofTypedEntries(Class<Key> keyType, Class<T> valueType, Map.Entry<? extends Key, ? extends T>... entries) Returns a QHash containing keys and values extracted from the given entries.static <Key,T> QHash<Key, T> ofTypedPairs(QMetaType keyType, QMetaType valueType, QPair<? extends Key, ? extends T>... pairs) Returns a QHash containing keys and values extracted from the given pairs.static <Key,T> QHash<Key, T> ofTypedPairs(Class<Key> keyType, Class<T> valueType, QPair<? extends Key, ? extends T>... pairs) Returns a QHash containing keys and values extracted from the given pairs.final TAssociates the specified value with the specified key in this map.final voidCopies all of the mappings from the specified map to this map.voidreadFrom(QDataStream stream) final TRemoves the mapping for a key from this map if it is present.final intfinal intremoveIf(BiPredicate<Key, T> predicate) final intfinal voidreserve(int size) final intsize()final voidsqueeze()See QHash::squeeze() final voidSeeQHash::swap(QHash<Key,T>&) final TSee QHash::take(Key) toString()Returns the string representation of the object given byQVariant(this).toString().final Tfinal Tvalues()voidwriteTo(QDataStream stream) Methods inherited from class io.qt.QtObject
dispose, isDisposedMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, entrySet, forEach, getOrDefault, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyType- the type KvalueType- the type V
-
QHash
Creating a container with given content.- Parameters:
other- map
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyType- the type KvalueMetaType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyType- the type KvalueMetaType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueMetaType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueMetaType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueMetaType- the type V
-
QHash
Creating a container with given key and value type.See
QHash::QHash() - Parameters:
keyMetaType- the type KvalueMetaType- the type V
-
-
Method Details
-
createVariantHash
Creating a QHash with QVariant type (QHash<QString,QVariant>).See
QHash::QHash() -
clone
Creates and returns a copy of this object. -
capacity
-
clear
See
QHash::clear() -
contains
-
count
-
count
-
constEnd
Provides a constant C++ iterator to the containers end.- Returns:
- end
-
constBegin
Provides a constant C++ iterator to the containers begin.- Returns:
- begin
-
end
Provides a mutable C++ iterator to the containers end.See
QHash::end() - Returns:
- end
-
begin
Provides a mutable C++ iterator to the containers begin.See
QHash::begin() - Returns:
- begin
-
find
- Returns:
- iterator
-
insert
-
isEmpty
-
key
-
key
-
keys
Returns aListof the keys contained in this associative container.- Returns:
- list of keys
-
keys
-
removeIf
-
removeIf
-
removeAll
-
reserve
-
size
-
squeeze
See QHash::
squeeze() -
take
See QHash::
take(Key) -
value
-
value
-
values
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QHash<Key,T>). -
toString
Returns the string representation of the object given byQVariant(this).toString().- Returns:
- String
-
containsKey
Returnstrueif this map contains a mapping for the specified key.- Specified by:
containsKeyin interfaceMap<Key,T> - See Also:
-
get
Returns the value to which the specified key is mapped, ornullif this map contains no mapping for the key. -
put
Associates the specified value with the specified key in this map. -
remove
Removes the mapping for a key from this map if it is present. -
containsValue
Returnstrueif this map maps one or more keys to the specified value.- Specified by:
containsValuein interfaceMap<Key,T> - See Also:
-
writeTo
-
readFrom
-
of
Returns a QHash containing a single mapping.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the mapping's keyt1- the mapping's value- Returns:
- a
QHashcontaining the specified mapping - Throws:
NullPointerException- if the key or the value isnull
-
of
Returns a QHash containing two mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
Returns a QHash containing three mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
Returns a QHash containing four mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing five mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing six mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing seven mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing eight mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing nine mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
of
public static <Key,T> QHash<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 QHash containing ten mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
k1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's valuek10- the tenth mapping's keyt10- the tenth mapping's value- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any key or value isnull
-
ofTyped
Returns a QHash containing a single mapping.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the mapping's keyt1- the mapping's value- Returns:
- a
QHashcontaining the specified mapping
-
ofTyped
public static <Key,T> QHash<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2) Returns a QHash containing two mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<Key,T> ofTyped(Class<Key> keyType, Class<T> valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3) Returns a QHash containing three mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing four mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing five mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing six mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing seven mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing eight mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing nine mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing ten mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's valuek10- the tenth mapping's keyt10- the tenth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
Returns a QHash containing a single mapping.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the mapping's keyt1- the mapping's value- Returns:
- a
QHashcontaining the specified mapping
-
ofTyped
public static <Key,T> QHash<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2) Returns a QHash containing two mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<Key,T> ofTyped(QMetaType keyType, QMetaType valueType, Key k1, T t1, Key k2, T t2, Key k3, T t3) Returns a QHash containing three mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing four mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing five mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing six mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing seven mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing eight mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing nine mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofTyped
public static <Key,T> QHash<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 QHash containing ten mappings.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typek1- the first mapping's keyt1- the first mapping's valuek2- the second mapping's keyt2- the second mapping's valuek3- the third mapping's keyt3- the third mapping's valuek4- the fourth mapping's keyt4- the fourth mapping's valuek5- the fifth mapping's keyt5- the fifth mapping's valuek6- the sixth mapping's keyt6- the sixth mapping's valuek7- the seventh mapping's keyt7- the seventh mapping's valuek8- the eighth mapping's keyt8- the eighth mapping's valuek9- the ninth mapping's keyt9- the ninth mapping's valuek10- the tenth mapping's keyt10- the tenth mapping's value- Returns:
- a
QHashcontaining the specified mappings
-
ofEntries
@SafeVarargs public static <Key,T> QHash<Key,T> ofEntries(Map.Entry<? extends Key, ? extends T> entry0, Map.Entry<? extends Key, ? extends T> ... entries) Returns a QHash containing keys and values extracted from the given entries.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
entries-java.util.Map.Entrys containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any entry, key, or value isnull, or if theentriesarray isnull
-
ofPairs
@SafeVarargs public static <Key,T> QHash<Key,T> ofPairs(QPair<? extends Key, ? extends T> pair0, QPair<? extends Key, ? extends T> ... pairs) Returns a QHash containing keys and values extracted from the given pairs.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
pairs-QPairs containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any entry, key, or value isnull, or if theentriesarray isnull
-
ofTypedPairs
@SafeVarargs public static <Key,T> QHash<Key,T> ofTypedPairs(Class<Key> keyType, Class<T> valueType, QPair<? extends Key, ? extends T>... pairs) Returns a QHash containing keys and values extracted from the given pairs.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
pairs-QPairs containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any pair, key, or value isnull, or if thepairsarray isnull
-
ofTypedPairs
@SafeVarargs public static <Key,T> QHash<Key,T> ofTypedPairs(QMetaType keyType, QMetaType valueType, QPair<? extends Key, ? extends T>... pairs) Returns a QHash containing keys and values extracted from the given pairs.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
pairs-QPairs containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any pair, key, or value isnull, or if thepairsarray isnull
-
ofTypedEntries
@SafeVarargs public static <Key,T> QHash<Key,T> ofTypedEntries(Class<Key> keyType, Class<T> valueType, Map.Entry<? extends Key, ? extends T>... entries) Returns a QHash containing keys and values extracted from the given entries.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typeentries-java.util.Map.Entrys containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any entry, key, or value isnull, or if theentriesarray isnull
-
ofTypedEntries
@SafeVarargs public static <Key,T> QHash<Key,T> ofTypedEntries(QMetaType keyType, QMetaType valueType, Map.Entry<? extends Key, ? extends T>... entries) Returns a QHash containing keys and values extracted from the given entries.- Type Parameters:
Key- theQHash's key typeT- theQHash's value type- Parameters:
keyType- key typevalueType- value typeentries-java.util.Map.Entrys containing the keys and values from which the map is populated- Returns:
- a
QHashcontaining the specified mappings - Throws:
NullPointerException- if any entry, key, or value isnull, or if theentriesarray isnull
-
assign
See
QHash::operator=(QHash<Key,T>) -
swap
See
QHash::swap(QHash<Key,T>&) -
isDetached
Returns true if container is not shared. -
detach
Detached the container if it is shared. -
putAll
Copies all of the mappings from the specified map to this map. -
iterator
Returns an iterator over elements of typeQPair<K,V>. -
entrySet
Returns aSetview of the mappings contained in this map. -
keySet
Returns aSetview of the keys contained in this map.
-