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
ConstructorsConstructorDescriptionCreating 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 booleanAdds the specified element to this set if it is not already present (optional operation).booleanaddAll(Collection<? extends T> c) Adds all of the elements in the specified collection to this container.final voidSeeQSet::operator=(QSet<T>) final intcapacity()final voidclear()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 booleanfinal booleancontainsAll(Collection<?> c) Returnstrueif this container contains all of the elements in the specified collection.final intcount()booleaninthashCode()Returns the objects's hash code computed byqHash(QSet<T>).final voidSeeQSet::insert(T) final voidintersect(Collection<T> other) final booleanintersects(Collection<T> other) final booleanisEmpty()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.voidreadFrom(QDataStream stream) final booleanSeeQSet::remove(T) final booleanremoveAll(Collection<?> c) Removes all of this container elements that are also contained in the specified collection.final booleanfinal voidreserve(int size) booleanretainAll(Collection<?> c) Retains only the elements in this container that are contained in the specified collection.final intsize()final voidsubtract(Collection<T> other) final voidSeeQSet::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 voidunite(Collection<T> other) values()voidwriteTo(QDataStream stream) Methods inherited from class io.qt.QtObject
dispose, isDisposedMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods 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:
removeIfin 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 elementeto this set if the set contains no elemente2such 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
QSetcontaining the specified element - Throws:
NullPointerException- if elements arenull
-
ofByte
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofShort
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofInt
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofLong
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofChar
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofFloat
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofDouble
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBoolean
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining the specified element
-
ofBuffer
Returns a QSet containing given elements.- Parameters:
elements-- Returns:
- a
QSetcontaining 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
QSetcontaining 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
QSetcontaining the specified element
-
toArray
Returns an array containing all of the elements in this container.- Specified by:
toArrayin interfaceCollection<T>
-
toArray
Returns an array containing all of the elements in this container.- Specified by:
toArrayin interfaceCollection<T>
-
containsAll
Returnstrueif this container contains all of the elements in the specified collection.- Specified by:
containsAllin interfaceCollection<T>
-
addAll
Adds all of the elements in the specified collection to this container.- Specified by:
addAllin interfaceCollection<T>
-
removeAll
Removes all of this container elements that are also contained in the specified collection.- Specified by:
removeAllin interfaceCollection<T>
-
retainAll
Retains only the elements in this container that are contained in the specified collection.- Specified by:
retainAllin interfaceCollection<T>
-
iterator
Returns an iterator over elements of typeT.- Specified by:
iteratorin interfaceCollection<T>- Specified by:
iteratorin interfaceIterable<T>- Returns:
- an Iterator
-