java.lang.Object
io.qt.QtObject
io.qt.internal.AbstractContainer<E>
io.qt.internal.AbstractSequentialContainer<T>
io.qt.core.QSet<T>
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Iterable<T>
,Collection<T>
,Set<T>
public class QSet<T>
extends io.qt.internal.AbstractSequentialContainer<T>
implements Set<T>, Cloneable
Java wrapper for Qt class QSet
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Constructor Summary
ModifierConstructorDescriptionCreating a container with given element type.QSet
(QMetaType.Type metaType) Creating a container with given element type.protected
Constructor for internal use only.Creating a container with given element type.QSet
(Collection<T> other) Creating a container with given content. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
final int
capacity()
final void
clear()
clone()
Creates and returns a copy of this object.protected final QSequentialConstIterator<T>
protected final QSequentialConstIterator<T>
constEnd()
final boolean
final int
count()
boolean
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical.int
hashCode()
final void
final void
intersect
(Collection<T> other) final boolean
intersects
(Collection<T> other) final boolean
isEmpty()
static <T> QSet<T>
of
(T element0, T... elements) Returns a QSet containing given elements.void
readFrom
(QDataStream stream) final boolean
final void
reserve
(int size) final int
size()
final void
subtract
(Collection<T> other) toString()
final void
unite
(Collection<T> other) values()
void
writeTo
(QDataStream stream) Methods inherited from class io.qt.internal.AbstractSequentialContainer
addAll, containsAll, descendingIterator, iterator, removeAll, retainAll, toArray, toArray
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.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
addAll, containsAll, iterator, removeAll, retainAll, spliterator, toArray, toArray
-
Constructor Details
-
QSet
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
QSet
Creating a container with given element type.See QSet::QSet()
- Parameters:
elementType
- the type T
-
QSet
Creating a container with given element type.See QSet::QSet()
- Parameters:
metaType
- the type T
-
QSet
Creating a container with given element type.See QSet::QSet()
- Parameters:
metaType
- the type T
-
QSet
Creating a container with given content.- Parameters:
other
- container
-
-
Method Details
-
clone
Creates and returns a copy of this object.- Specified by:
clone
in classio.qt.internal.AbstractSequentialContainer<T>
-
constBegin
- Specified by:
constBegin
in classio.qt.internal.AbstractContainer<T>
-
capacity
-
clear
-
contains
-
count
-
constEnd
- Specified by:
constEnd
in classio.qt.internal.AbstractContainer<T>
-
insert
-
intersect
-
intersects
-
isEmpty
-
remove
-
reserve
-
size
-
subtract
-
unite
-
values
-
equals
Description copied from class:QtObject
Used to check if this object shares the same native counterpart with the other object, i.e. the objects are equals if their native counterparts are identical. Qt value types override this method to make a value comparison. Otherwise it will return the result of calling the super class implementation. -
hashCode
-
toString
- Overrides:
toString
in classio.qt.internal.AbstractSequentialContainer<T>
-
add
-
writeTo
-
readFrom
-
of
Returns a QSet containing given elements.- Type Parameters:
E
- theQSet
's element type- Parameters:
element0
- the first elementelements
- subsequent elements- Returns:
- a
QSet
containing the specified element - Throws:
NullPointerException
- if elements arenull
-