java.lang.Object
io.qt.QtObject
io.qt.core.QVector<T>
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
,SequencedCollection<T>
- Direct Known Subclasses:
QBarDataRow
,QPolygon
,QPolygonF
,QScatterDataArray
,QStack
,QSurfaceDataRow
,QXmlStreamAttributes
Java wrapper for Qt class QVector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
final boolean
addAll
(int index, Collection<? extends T> c) Inserts all of the elements in the specified collection into this list at the specified position.final boolean
addAll
(Collection<? extends T> c) Appends all of the elements in the specified collection to the end of this list.final void
append
(Collection<T> t) final void
final T
at
(int i) protected final QSequentialIterator
<T> begin()
final int
capacity()
final void
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()
final int
Creating a container of type QVariant.protected final QSequentialIterator
<T> end()
final boolean
boolean
final void
final void
final T
first()
get
(int index) int
hashCode()
Returns the objects's hash code computed byqHash(QVector<T>)
.int
final int
final void
final void
final boolean
isEmpty()
Returnstrue
if this container contains no elements.iterator()
Returns an iterator over elements of typeT
.final T
last()
final int
final int
lastIndexOf
(T t, int from) final int
length()
final ListIterator
<T> Returns a list iterator over the elements in this list (in proper sequence).final ListIterator
<T> listIterator
(int index) Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.mid
(int pos) mid
(int pos, int length) final void
move
(int from, int to) static <T> QVector
<T> of
(T element0, T... elements) Returns a QVector containing given elements.final void
void
readFrom
(QDataStream stream) Seeoperator>>(QDataStream&,
QVector<T>&) final T
remove
(int index) Removes the element at the specified position in this list.final void
remove
(int i, int n) boolean
final boolean
removeAll
(Collection<?> c) Removes all of this container elements that are also contained in the specified collection.final int
final void
removeAt
(int i) final T
final boolean
final T
final boolean
final void
final void
reserve
(int size) final void
resize
(int size) final boolean
retainAll
(Collection<?> c) Retains only the elements in this list that are contained in the specified collection (optional operation).final int
size()
Returns the number of elements in this container.final void
squeeze()
final boolean
startsWith
(T t) subList
(int fromIndex, int toIndex) Returns a view of the portion of this list between the specifiedfromIndex
, inclusive, andtoIndex
, exclusive.final void
swapItemsAt
(int i, int j) final T
takeAt
(int i) final T
final T
takeLast()
final Object[]
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.toSet()
toString()
Returns a string representation of this sequential container.final T
value
(int i) final T
void
writeTo
(QDataStream stream) Seeoperator<<(QDataStream&,
QVector<T>) 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.List
addFirst, addLast, containsAll, getFirst, getLast, iterator, removeAll, replaceAll, reversed, sort, spliterator, toArray, toArray
-
Constructor Details
-
QVector
protected QVector(io.qt.QtObject.QPrivateConstructor p) Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
QVector
-
QVector
-
QVector
-
QVector
-
-
Method Details
-
createVariantVector
Creating a container of type QVariant. -
clone
Creates and returns a copy of this object. -
append
-
append
-
at
-
begin
-
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
-
capacity
-
clear
-
contains
-
count
-
count
-
endsWith
-
fill
-
fill
-
first
-
indexOf
-
insert
-
insert
-
isEmpty
Returnstrue
if this container contains no elements. -
last
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
lastIndexOf
-
length
-
mid
-
mid
-
move
-
prepend
-
remove
-
removeAll
-
removeAt
-
removeFirst
- Specified by:
removeFirst
in interfaceList<T>
- Specified by:
removeFirst
in interfaceSequencedCollection<T>
-
removeLast
- Specified by:
removeLast
in interfaceList<T>
- Specified by:
removeLast
in interfaceSequencedCollection<T>
-
removeOne
-
removeIf
- Specified by:
removeIf
in interfaceCollection<T>
-
replace
-
reserve
-
resize
-
squeeze
-
size
Returns the number of elements in this container. If this container contains more thanInteger.MAX_VALUE
elements, returnsInteger.MAX_VALUE
. -
startsWith
-
takeAt
-
takeFirst
-
takeLast
-
toSet
-
value
-
value
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QVector<T>)
. -
toString
Returns a string representation of this sequential container.- Returns:
- String
-
add
-
add
-
set
-
remove
-
indexOf
-
get
-
swapItemsAt
-
writeTo
See
operator<<(QDataStream&,
QVector<T>) -
readFrom
See
operator>>(QDataStream&,
QVector<T>&) -
of
Returns a QVector containing given elements.- Type Parameters:
T
- theQVector
's element type- Parameters:
element0
- the first elementelements
- subsequent elements- Returns:
- a
QVector
containing the specified element - Throws:
NullPointerException
- if elements arenull
-
addAll
Appends all of the elements in the specified collection to the end of this list.- Specified by:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceList<T>
-
addAll
Inserts all of the elements in the specified collection into this list at the specified position. -
remove
Removes the element at the specified position in this list. -
listIterator
Returns a list iterator over the elements in this list (in proper sequence).- Specified by:
listIterator
in interfaceList<T>
-
listIterator
Returns a list iterator over the elements in this list (in proper sequence), starting at the specified position in the list.- Specified by:
listIterator
in interfaceList<T>
-
subList
Returns a view of the portion of this list between the specifiedfromIndex
, inclusive, andtoIndex
, exclusive. (IffromIndex
andtoIndex
are equal, the returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of the optional list operations supported by this list. -
retainAll
Retains only the elements in this list that are contained in the specified collection (optional operation). In other words, removes from this list all of its elements that are not contained in the specified collection.- Specified by:
retainAll
in interfaceCollection<T>
- Specified by:
retainAll
in interfaceList<T>
-
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>
-
removeAll
Removes all of this container elements that are also contained in the specified collection.- Specified by:
removeAll
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
-