java.lang.Object
io.qt.QtObject
io.qt.core.QList<T>
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
,Iterable<T>
,Collection<T>
,List<T>
- Direct Known Subclasses:
QBarDataArray
,QBarDataArray
,QBarDataRow
,QBarDataRow
,QBluetoothServiceInfo.Alternative
,QBluetoothServiceInfo.Sequence
,QItemSelection
,QNdefMessage
,QPolygon
,QPolygonF
,QQueue
,QScatterDataArray
,QScatterDataArray
,QStack
,QStringList
,QSurfaceDataArray
,QSurfaceDataArray
,QSurfaceDataRow
,QSurfaceDataRow
,QTestEventList
,QXmlStreamAttributes
Java wrapper for Qt class QList
-
Constructor Summary
ConstructorDescriptionCreating a container filled with given value.Creating a container with given element type.Creating a container with given element type and size.Creating a container with given element type and values.QList
(QMetaType.Type metaType) Creating a container with given element type.QList
(QMetaType.Type metaType, int size) Creating a container with given element type and size.QList
(QMetaType.Type metaType, T ... elements) Creating a container with given element type and values.Creating a container with given element type.Creating a container with given element type and size.Creating a container with given element type and values.Creating a container with given content.QList
(Collection<T> other) Creating a container with given content. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
Inserts the specified element at the specified position in this list.boolean
Appends the specified element to the end of this list.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
SeeQList::
append(T) static boolean []
static byte []
asByteArray
(QList<@QtPrimitiveType Byte> list) static ByteBuffer
asByteBuffer
(QList<@QtPrimitiveType Byte> list) static char []
static CharBuffer
static double []
asDoubleArray
(QList<@QtPrimitiveType Double> list) static DoubleBuffer
static float []
asFloatArray
(QList<@QtPrimitiveType Float> list) static FloatBuffer
asFloatBuffer
(QList<@QtPrimitiveType Float> list) static int []
asIntArray
(QList<@QtPrimitiveType Integer> list) static IntBuffer
asIntBuffer
(QList<@QtPrimitiveType Integer> list) static long []
asLongArray
(QList<@QtPrimitiveType Long> list) static LongBuffer
asLongBuffer
(QList<@QtPrimitiveType Long> list) static <T> T []
asObjectArray
(QList<@QtPrimitiveType T> list) static short []
asShortArray
(QList<@QtPrimitiveType Short> list) static ShortBuffer
asShortBuffer
(QList<@QtPrimitiveType Short> list) final void
SeeQList::
operator=(QList<T>) final T
at
(int i) protected final QSequentialIterator<T>
begin()
Provides a mutable C++ iterator to the containers begin.final int
capacity()
final void
clear()
SeeQList::
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.createVariantList
(int size) Creating a container of type QVariant and given size.final void
detach()
Detached the container if it is shared.protected final QSequentialIterator<T>
end()
Provides a mutable C++ iterator to the containers end.final boolean
boolean
final void
final void
final T
first()
final T
get
(int index) Returns the element at the specified position in this list.int
hashCode()
Returns the objects's hash code computed byqHash(QList<T>)
.final int
final int
final void
final void
final boolean
Returns true if container is not shared.final boolean
isEmpty()
final boolean
isSharedWith
(QList<?> other) Returns true of both containers share the same data.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 QStringList
Returns a QStringList containing given elements.static <T> QList<T>
of
(T element0, T ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Boolean>
ofBoolean
(boolean ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Byte>
ofBuffer
(ByteBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Character>
ofBuffer
(CharBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Double>
ofBuffer
(DoubleBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Float>
ofBuffer
(FloatBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Integer>
Returns a QList containing given elements.static QList<@QtPrimitiveType Long>
ofBuffer
(LongBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Short>
ofBuffer
(ShortBuffer elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Byte>
ofByte
(byte ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Character>
ofChar
(char ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Double>
ofDouble
(double ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Float>
ofFloat
(float ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Integer>
ofInt
(int ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Long>
ofLong
(long ... elements) Returns a QList containing given elements.static QList<@QtPrimitiveType Short>
ofShort
(short ... elements) Returns a QList containing given elements.static <T> QList<T>
Returns a QList containing given elements.static <T> QList<T>
Returns a QList containing given elements.final void
void
readFrom
(QDataStream stream) final T
remove
(int index) Removes the element at the specified position in this list.final void
remove
(int i, int n) final boolean
Removes the first occurrence of the specified element from this list, if it is present.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 T
Replaces the element at the specified position in this list with the specified element.final int
size()
final void
squeeze()
SeeQList::
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
SeeQList::
swap(QList<T>&) final void
swapItemsAt
(int i, int j) final T
takeAt
(int i) final T
final T
takeLast()
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 T
value
(int i) final T
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.List
containsAll, iterator, removeAll, replaceAll, sort, spliterator, toArray, toArray
-
Constructor Details
-
QList
Creating a container with given element type.See
QList::
QList() - Parameters:
metaType
- the type T
-
QList
Creating a container with given element type and values.See
QList::
QList() - Parameters:
metaType
- the type T
-
QList
Creating a container with given element type.See
QList::
QList() - Parameters:
elementType
- the type T
-
QList
Creating a container with given element type and values.See
QList::
QList() - Parameters:
elementType
- the type T
-
QList
Creating a container with given element type.See
QList::
QList() - Parameters:
metaType
- the type T
-
QList
Creating a container with given element type and values.See
QList::
QList() - Parameters:
metaType
- the type T
-
QList
Creating a container with given element type and size.- Parameters:
metaType
- the type T
-
QList
Creating a container with given element type and size.- Parameters:
elementType
- the type T
-
QList
Creating a container with given element type and size.- Parameters:
metaType
- the type T
-
QList
Creating a container filled with given value. -
QList
Creating a container with given content.- Parameters:
other
- container
-
QList
Creating a container with given content.- Parameters:
other
- container
-
-
Method Details
-
createVariantList
Creating a container of type QVariant. -
createVariantList
Creating a container of type QVariant and given size. -
clone
Creates and returns a copy of this object. -
append
-
append
See
QList::
append(T) -
assign
See
QList::
operator=(QList<T>) -
swap
See
QList::
swap(QList<T>&) -
at
-
clear
See
QList::
clear() -
contains
-
count
-
count
-
begin
Provides a mutable C++ iterator to the containers begin.See
QList::
begin() - Returns:
- begin
-
end
Provides a mutable C++ iterator to the containers end.See
QList::
end() - Returns:
- 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
-
endsWith
-
first
-
indexOf
-
insert
-
isEmpty
-
last
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
lastIndexOf
-
length
-
mid
-
mid
-
move
-
prepend
-
removeAll
-
removeIf
- Specified by:
removeIf
in interfaceCollection<T>
-
removeAt
-
removeFirst
-
removeLast
-
removeOne
-
replace
-
reserve
-
size
-
startsWith
-
takeAt
-
takeFirst
-
takeLast
-
value
-
value
-
equals
-
hashCode
Returns the objects's hash code computed byqHash(QList<T>)
. -
toString
Returns the string representation of the object given byQVariant(this).toString()
.- Returns:
- String
-
asByteBuffer
-
asShortBuffer
-
asIntBuffer
-
asLongBuffer
-
asCharBuffer
-
asFloatBuffer
-
asDoubleBuffer
-
asByteArray
-
asShortArray
-
asIntArray
-
asLongArray
-
asCharArray
-
asFloatArray
-
asDoubleArray
-
asBooleanArray
-
asObjectArray
-
add
Appends the specified element to the end of this list. -
add
Inserts the specified element at the specified position in this list. -
set
Replaces the element at the specified position in this list with the specified element. -
remove
Removes the first occurrence of the specified element from this list, if it is present. -
indexOf
-
get
Returns the element at the specified position in this list. -
swapItemsAt
-
fill
-
fill
-
insert
-
remove
-
capacity
-
resize
-
squeeze
See
QList::
squeeze() -
writeTo
-
readFrom
-
of
Returns a QList containing given elements.- Type Parameters:
T
- theQList
's element type- Parameters:
element0
- the first elementelements
- subsequent elements- Returns:
- a
QList
containing the specified element - Throws:
NullPointerException
- if elements arenull
-
of
Returns a QStringList containing given elements.- Parameters:
element0
- the first elementelements
- subsequent elements- Returns:
- a
QStringList
containing the specified element
-
ofByte
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofShort
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofInt
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofLong
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofChar
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofFloat
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofDouble
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBoolean
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofBuffer
Returns a QList containing given elements.- Parameters:
elements
-- Returns:
- a
QList
containing the specified element
-
ofTyped
Returns a QList containing given elements.- Type Parameters:
T
- theQList
's element type- Parameters:
type
- theQList
's element typeelements
- all list elements to be added- Returns:
- a
QList
containing the specified element
-
ofTyped
Returns a QList containing given elements.- Type Parameters:
T
- theQList
's element type- Parameters:
metaType
- theQList
's element typeelements
- all list elements to be added- Returns:
- a
QList
containing the specified element
-
isDetached
Returns true if container is not shared. -
detach
Detached the container if it is shared. -
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
-