java.lang.Object
io.qt.core.QPair<T,S>
- All Implemented Interfaces:
Cloneable
QPair keeps two generic values accessible by
first
and second
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a copy of this object.boolean
Returns true if this pair is the same as the other pair.static <T,
S> QPair<T, S> Convenient entry-pair converter method for new pair.int
hashCode()
static <T,
S> QPair<T, S> pair
(T t, S s) Convenient factory method for new pair.static <T,
S> Map.Entry<T, S> Convenient pair-entry converter method.toString()
Returns a string representation of this pair.
-
Field Details
-
first
First value of the pair. -
second
Second value of the pair.
-
-
Constructor Details
-
QPair
Constructs a pair.- Parameters:
t
- The first parameter.s
- The second parameter.
-
-
Method Details
-
equals
Returns true if this pair is the same as the other pair. If any of the first or second members are null the result is false regardless. -
hashCode
-
toString
Returns a string representation of this pair. -
clone
Returns a copy of this object. -
pair
Convenient factory method for new pair.- Parameters:
t
-s
-- Returns:
- new pair
-
fromEntry
Convenient entry-pair converter method for new pair.- Parameters:
entry
-- Returns:
- new pair
-
toEntry
Convenient pair-entry converter method.- Parameters:
pair
-- Returns:
- new entry
-