java.lang.Object
io.qt.QtObject
io.qt.core.QSet<T>
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Iterable<T>
,Collection<T>
,Set<T>
Java wrapper for Qt class QSet
-
Constructor Summary
ConstructorDescriptionCreating a container with given element type.QSet
(QMetaType.Type metaType) Creating a container with given element type.Creating a container with given element type.QSet
(Collection<T> other) Creating a container with given content. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Adds the specified element to this set if it is not already present (optional operation).boolean
addAll
(Collection<? extends T> c) Adds all of the elements in the specified collection to this container.final void
SeeQSet::
operator=(QSet<T>) final int
capacity()
final void
clear()
SeeQSet::
clear() clone()
Creates and returns a copy of this object.protected final QSequentialConstIterator<T>
Provides a constant C++ iterator to the containers begin.protected final QSequentialConstIterator<T>
constEnd()
Provides a constant C++ iterator to the containers end.final boolean
final boolean
containsAll
(Collection<?> c) Returnstrue
if this container contains all of the elements in the specified collection.final int
count()
boolean
int
hashCode()
Returns the objects's hash code computed byqHash(QSet<T>)
.final void
SeeQSet::
insert(T) final void
intersect
(Collection<T> other) final boolean
intersects
(Collection<T> other) final boolean
isEmpty()
iterator()
Returns an iterator over elements of typeT
.static <T> QSet<T>
of
(T element0, T ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Boolean>
ofBoolean
(boolean ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Byte>
ofBuffer
(ByteBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Character>
ofBuffer
(CharBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Double>
ofBuffer
(DoubleBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Float>
ofBuffer
(FloatBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Integer>
Returns a QSet containing given elements.static QSet<@QtPrimitiveType Long>
ofBuffer
(LongBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Short>
ofBuffer
(ShortBuffer elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Byte>
ofByte
(byte ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Character>
ofChar
(char ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Double>
ofDouble
(double ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Float>
ofFloat
(float ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Integer>
ofInt
(int ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Long>
ofLong
(long ... elements) Returns a QSet containing given elements.static QSet<@QtPrimitiveType Short>
ofShort
(short ... elements) Returns a QSet containing given elements.static <T> QSet<T>
Returns a QSet containing given elements.static <T> QSet<T>
Returns a QSet containing given elements.void
readFrom
(QDataStream stream) final boolean
SeeQSet::
remove(T) final boolean
removeAll
(Collection<?> c) Removes all of this container elements that are also contained in the specified collection.final boolean
final void
reserve
(int size) boolean
retainAll
(Collection<?> c) Retains only the elements in this container that are contained in the specified collection.final int
size()
final void
subtract
(Collection<T> other) final void
SeeQSet::
swap(QSet<T>) final T[]
toArray()
Returns an array containing all of the elements in this container.final <A> A[]
toArray
(A[] a) Returns an array containing all of the elements in this container.toString()
Returns the string representation of the object given byQVariant(this).toString()
.final void
unite
(Collection<T> other) values()
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.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.Set
addAll, containsAll, iterator, removeAll, retainAll, spliterator, toArray, toArray
-
Constructor Details
-
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. -
constBegin
Provides a constant C++ iterator to the containers begin.- Returns:
- begin
-
capacity
-
clear
See
QSet::
clear() -
contains
-
count
-
constEnd
Provides a constant C++ iterator to the containers end.- Returns:
- end
-
insert
See
QSet::
insert(T) -
intersect
-
intersects
-
isEmpty
-
remove
See
QSet::
remove(T) -
removeIf
- Specified by:
removeIf
in interfaceCollection<T>
-
reserve
-
size
-
subtract
-
unite
-
values
-
assign
See
QSet::
operator=(QSet<T>) -
swap
See
QSet::
swap(QSet<T>) -
equals
-
hashCode
Returns the objects's hash code computed byqHash(QSet<T>)
. -
toString
Returns the string representation of the object given byQVariant(this).toString()
.- Returns:
- String
-
add
Adds the specified element to this set if it is not already present (optional operation). More formally, adds the specified elemente
to this set if the set contains no elemente2
such thatObjects.equals(e, e2)
. If this set already contains the element, the call leaves the set unchanged and returnsfalse
. In combination with the restriction on constructors, this ensures that sets never contain duplicate elements. -
writeTo
-
readFrom
-
of
Returns a QSet containing given elements.- Type Parameters:
T
- theQSet
's element type- Parameters:
element0
- the first elementelements
- subsequent elements- Returns:
- a
QSet
containing the specified element - Throws:
NullPointerException
- if elements arenull
-
ofByte
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofShort
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofInt
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofLong
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofChar
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofFloat
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofDouble
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBoolean
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements
-- Returns:
- a
QSet
containing the specified element
-
ofTyped
Returns a QSet containing given elements.- Type Parameters:
T
- theQSet
's element type- Parameters:
type
- theQSet
's element typeelements
- all list elements to be added- Returns:
- a
QSet
containing the specified element
-
ofTyped
Returns a QSet containing given elements.- Type Parameters:
T
- theQSet
's element type- Parameters:
metaType
- theQSet
's element typeelements
- all list elements to be added- Returns:
- a
QSet
containing the specified element
-
toArray
Returns an array containing all of the elements in this container.- Specified by:
toArray
in interfaceCollection<T>
-
toArray
Returns an array containing all of the elements in this container.- Specified by:
toArray
in interfaceCollection<T>
-
containsAll
Returnstrue
if this container contains all of the elements in the specified collection.- Specified by:
containsAll
in interfaceCollection<T>
-
addAll
Adds all of the elements in the specified collection to this container.- Specified by:
addAll
in interfaceCollection<T>
-
removeAll
Removes all of this container elements that are also contained in the specified collection.- Specified by:
removeAll
in interfaceCollection<T>
-
retainAll
Retains only the elements in this container that are contained in the specified collection.- Specified by:
retainAll
in interfaceCollection<T>
-
iterator
Returns an iterator over elements of typeT
.- Specified by:
iterator
in interfaceCollection<T>
- Specified by:
iterator
in interfaceIterable<T>
- Returns:
- an Iterator
-