java.lang.Object
io.qt.QtObject
io.qt.core.QMultiHash<Key,T>
Java wrapper for Qt class QMultiHash
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionQMultiHash
(QMetaType.Type keyMetaType, QMetaType valueMetaType) Creating a container with given key and value type.QMultiHash
(QMetaType.Type keyMetaType, QMetaType.Type valueMetaType) Creating a container with given key and value type.QMultiHash
(QMetaType.Type keyMetaType, Class<T> valueType) Creating a container with given key and value type.QMultiHash
(QMetaType keyMetaType, QMetaType valueMetaType) Creating a container with given key and value type.QMultiHash
(QMetaType keyMetaType, QMetaType.Type valueMetaType) Creating a container with given key and value type.QMultiHash
(QMetaType keyMetaType, Class<T> valueType) Creating a container with given key and value type.QMultiHash
(Class<Key> keyType, QMetaType valueMetaType) Creating a container with given key and value type.QMultiHash
(Class<Key> keyType, QMetaType.Type valueMetaType) Creating a container with given key and value type.QMultiHash
(Class<Key> keyType, Class<T> valueType) Creating a container with given key and value type.QMultiHash
(Map<Key, List<T>> other) Creating a container with given content. -
Method Summary
Modifier and TypeMethodDescriptionprotected final QAssociativeIterator<Key,
T> begin()
Provides a mutable C++ iterator to the containers begin.final int
capacity()
final void
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 boolean
final boolean
final boolean
containsKey
(Object key) Returnstrue
if this map contains a mapping for the specified key.final boolean
containsValue
(Object value) Returnstrue
if this map maps one or more keys to the specified value.final int
count()
final int
final int
protected final QAssociativeIterator<Key,
T> end()
Provides a mutable C++ iterator to the containers end.entrySet()
Returns aSet
view of the mappings contained in this map.boolean
final QAssociativeConstIterator<Key,
T> final QAssociativeConstIterator<Key,
T> Returns the value to which the specified key is mapped, ornull
if this map contains no mapping for the key.int
hashCode()
Returns the objects's hash code computed byqHash(QMultiHash<Key,T>)
.final void
final boolean
isEmpty()
iterator()
Returns an iterator over elements of typeQPair<K,V>
.final Key
final Key
keys()
Returns aList
of the keys contained in this associative container.keySet()
Returns aSet
view of the keys contained in this map.static <Key,
T> QMultiHash<Key, T> of
(Key k1, T t1) Returns a QMultiHash containing a single mapping.static <Key,
T> QMultiHash<Key, T> of
(Key k1, T t1, Key k2, T t2) Returns a QMultiHash containing two mappings.static <Key,
T> QMultiHash<Key, T> of
(Key k1, T t1, Key k2, T t2, Key k3, T t3) Returns a QMultiHash containing three mappings.static <Key,
T> QMultiHash<Key, T> of
(Key k1, T t1, Key k2, T t2, Key k3, T t3, Key k4, T t4) Returns a QMultiHash containing four mappings.static <Key,
T> QMultiHash<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 QMultiHash containing five mappings.static <Key,
T> QMultiHash<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 QMultiHash containing six mappings.static <Key,
T> QMultiHash<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 QMultiHash containing seven mappings.static <Key,
T> QMultiHash<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 QMultiHash containing eight mappings.static <Key,
T> QMultiHash<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 QMultiHash containing nine mappings.static <Key,
T> QMultiHash<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 QMultiHash containing ten mappings.static <Key,
T> QMultiHash<Key, T> ofEntries
(Map.Entry<? extends Key, ? extends T> entry0, Map.Entry<? extends Key, ? extends T>... entries) Returns a QMultiHash containing keys and values extracted from the given entries.static <Key,
T> QMultiHash<Key, T> Returns a QMultiHash containing keys and values extracted from the given pairs.Associates the specified value with the specified key in this map.final void
Copies all of the mappings from the specified map to this map.void
readFrom
(QDataStream stream) Removes the mapping for a key from this map if it is present.final int
final int
final int
removeIf
(BiPredicate<Key, T> predicate) final int
final void
replaceOne
(Key key, T value) final void
reserve
(int size) final int
size()
final void
squeeze()
final T
toString()
Returns the string representation of the object given byQVariant(this).toString()
.final void
final void
unite
(Map<? super Key, ? extends Collection<? super T>> other) final T
final T
values()
Returns aList
of the values contained in this multihash.void
writeTo
(QDataStream stream) 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, entrySet, forEach, getOrDefault, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyType
- the type KvalueMetaType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueMetaType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueMetaType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueMetaType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyType
- the type KvalueType
- the type V
-
QMultiHash
Creating a container with given content.- Parameters:
other
- map
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyType
- the type KvalueMetaType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueType
- the type V
-
QMultiHash
Creating a container with given key and value type.- Parameters:
keyMetaType
- the type KvalueMetaType
- the type V
-
-
Method Details
-
clone
Creates and returns a copy of this object. -
capacity
-
clear
-
contains
-
count
-
count
-
begin
Provides a mutable C++ iterator to the containers begin.- Returns:
- begin
-
end
Provides a mutable C++ iterator to the containers end.- Returns:
- end
-
constBegin
Provides a constant C++ iterator to the containers begin.- Returns:
- begin
-
constEnd
Provides a constant C++ iterator to the containers end.- Returns:
- end
-
find
- Returns:
- iterator
-
insert
-
isEmpty
-
key
-
key
-
keys
Returns aList
of the keys contained in this associative container.- Returns:
- list of keys
-
keys
-
removeIf
-
removeIf
-
removeAll
-
reserve
-
size
-
squeeze
-
take
-
uniqueKeys
- Returns:
- list of keys
-
unite
-
unite
-
value
-
value
-
values
Returns aList
of the values contained in this multihash. -
listOfValues
-
values
-
count
-
find
-
removeAll
-
replaceOne
-
contains
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QMultiHash<Key,T>)
. -
toString
Returns the string representation of the object given byQVariant(this).toString()
.- Returns:
- String
-
containsKey
Returnstrue
if this map contains a mapping for the specified key.- Specified by:
containsKey
in interfaceMap<Key,
T> - See Also:
-
get
Returns the value to which the specified key is mapped, ornull
if 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
Returnstrue
if this map maps one or more keys to the specified value.- Specified by:
containsValue
in interfaceMap<Key,
T> - See Also:
-
writeTo
-
readFrom
-
of
Returns a QMultiHash containing a single mapping.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
's value type- Parameters:
k1
- the mapping's keyt1
- 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:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMultiHash containing three mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
Returns a QMultiHash containing four mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing five mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing six mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing seven mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing eight mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing nine mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
of
public static <Key,T> QMultiHash<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 QMultiHash containing ten mappings.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
'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
QMultiHash
containing the specified mappings - Throws:
NullPointerException
- if any key or value isnull
-
ofEntries
@SafeVarargs public static <Key,T> QMultiHash<Key,T> ofEntries(Map.Entry<? extends Key, ? extends T> entry0, Map.Entry<? extends Key, ? extends T>... entries) Returns a QMultiHash containing keys and values extracted from the given entries.- Type Parameters:
Key
- theQMultiHash
's key typeT
- 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
-
ofPairs
@SafeVarargs public static <Key,T> QMultiHash<Key,T> ofPairs(QPair<? extends Key, ? extends T> pair0, QPair<? extends Key, ? extends T>... pairs) Returns a QMultiHash containing keys and values extracted from the given pairs.- Type Parameters:
Key
- theQMultiHash
's key typeT
- theQMultiHash
's value type- Parameters:
pairs
-QPair
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
-
keySet
Returns aSet
view of the keys contained in this map. -
entrySet
Returns aSet
view of the mappings contained in this map. -
putAll
Copies all of the mappings from the specified map to this map. -
iterator
Returns an iterator over elements of typeQPair<K,V>
.
-