java.lang.Object
io.qt.internal.QtJambiObject
io.qt.QtObject
io.qt.internal.QtJambiAbstractMapObject<K,V>
io.qt.internal.QtJambiMapObject<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>
Java wrapper for Qt class QMap
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Constructor Summary
ModifierConstructorDescriptionQMap
(QMetaType.Type keyMetaType, QMetaType valueMetaType) QMap
(QMetaType.Type keyMetaType, QMetaType.Type valueMetaType) QMap
(QMetaType.Type keyMetaType, Class<V> valueType) QMap
(QMetaType keyMetaType, QMetaType.Type valueMetaType) protected
QMap
(Class<K> keyType, QMetaType.Type valueMetaType) -
Method Summary
Modifier and TypeMethodDescriptionprotected final QMapIterator<K,
V> begin()
final void
clear()
clone()
final Comparator<K>
final boolean
final boolean
containsKey
(Object key) final boolean
containsValue
(Object value) final int
count()
final int
protected final QMapIterator<K,
V> end()
boolean
Used to check if this object shares native resources with the other object if the other object is a subtype of QtJambiInterface.final QMapIterator<K,
V> final V
first()
final K
firstKey()
final V
int
hashCode()
final void
final boolean
isEmpty()
final K
final K
keys()
final V
last()
final K
lastKey()
final QMapIterator<K,
V> lowerBound
(K key) static <K,
V> QMap<K, V> of
(K k1, V v1) Returns a QMap containing a single mapping.static <K,
V> QMap<K, V> of
(K k1, V v1, K k2, V v2) Returns a QMap containing two mappings.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.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.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.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.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.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.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.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.static <K,
V> QMap<K, V> Returns a QMap containing keys and values extracted from the given entries.final V
void
readFrom
(QDataStream stream) final V
final int
final int
size()
final V
final QMapIterator<K,
V> upperBound
(K key) final V
final V
values()
void
writeTo
(QDataStream stream) Methods inherited from class io.qt.internal.QtJambiMapObject
ceilingEntry, ceilingKey, descendingKeySet, descendingMap, entrySet, firstEntry, floorEntry, floorKey, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, subMap, subMap, tailMap, tailMap
Methods inherited from class io.qt.internal.QtJambiAbstractMapObject
iterator, putAll, toString
Methods inherited from class io.qt.QtObject
dispose, isDisposed
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
QMap
-
-
Method Details
-
createVariantMap
-
clone
-
begin
- Specified by:
begin
in classQtJambiAbstractMapObject<K,
V>
-
clear
-
contains
-
count
-
count
-
end
- Specified by:
end
in classQtJambiAbstractMapObject<K,
V>
-
find
- Specified by:
find
in classQtJambiMapObject<K,
V>
-
first
-
firstKey
-
insert
-
isEmpty
-
key
-
key
-
keys
- Specified by:
keys
in classQtJambiAbstractMapObject<K,
V>
-
keys
-
last
-
lastKey
-
lowerBound
- Specified by:
lowerBound
in classQtJambiMapObject<K,
V>
-
removeAll
-
size
-
take
-
upperBound
- Specified by:
upperBound
in classQtJambiMapObject<K,
V>
-
value
-
value
-
values
-
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
-
comparator
- Specified by:
comparator
in interfaceSortedMap<K,
V>
-
containsKey
- Specified by:
containsKey
in interfaceMap<K,
V>
-
get
-
put
-
remove
-
containsValue
- Specified by:
containsValue
in interfaceMap<K,
V>
-
writeTo
-
readFrom
-
of
Returns a QMap containing a single mapping.- Type Parameters:
K
- theQMap
's key typeV
- theQMap
's value type- Parameters:
k1
- the mapping's keyv1
- the mapping's value- Returns:
- a
QMap
containing the specified mapping - Throws:
NullPointerException
- if the key or the value isnull
-
of
Returns a QMap containing two mappings.- Type Parameters:
K
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMap containing three mappings.- Type Parameters:
K
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMap containing four mappings.- Type Parameters:
K
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMap containing five mappings.- Type Parameters:
K
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
'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
QMap
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
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
- theQMap
's key typeV
- theQMap
's value type- Parameters:
entries
-java.util.Map.Entry
s 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 isnull
, or if theentries
array isnull
-