java.lang.Object
io.qt.QtObject
io.qt.internal.AbstractSequentialConstIterator<T>
io.qt.core.QSequentialConstIterator<T>
- Type Parameters:
T
- value type
- All Implemented Interfaces:
QIterator<T>
,QtObjectInterface
,Iterable<T>
- Direct Known Subclasses:
QSequentialIterator
public class QSequentialConstIterator<T>
extends io.qt.internal.AbstractSequentialConstIterator<T>
implements Iterable<T>, QIterator<T>
Java-iterable wrapper for Qt's constant iterator types:
- QList<T>::const_iterator
- QSet<T>::const_iterator
- and all other sequential constant iterators
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.QtObject
QtObject.QPrivateConstructor
-
Method Summary
Modifier and TypeMethodDescriptionprotected final T
Returns the current item's value if item is valid or throws NoSuchElementException otherwise.protected final void
Advances the iterator to the previous item in the container.protected boolean
equals
(io.qt.internal.AbstractSequentialConstIterator<?> o) Returns true if other points to the same item as this iterator; otherwise returns false.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.protected final void
Advances the iterator to the next item in the container.iterator()
protected final T
val()
Returns the current item's value.value()
Returns the value at iterator's position in the container or emptiness in case ofend
.Methods inherited from class io.qt.internal.AbstractSequentialConstIterator
begin, compareOwners, end, isConstant, toJavaDescendingIterator, toJavaIterator
Methods inherited from class io.qt.QtObject
dispose, isDisposed
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.qt.QtObjectInterface
dispose, isDisposed
-
Method Details
-
val
Returns the current item's value.- Specified by:
val
in classio.qt.internal.AbstractSequentialConstIterator<T>
-
increment
Advances the iterator to the next item in the container.- Specified by:
increment
in classio.qt.internal.AbstractSequentialConstIterator<T>
-
decrement
Advances the iterator to the previous item in the container.- Specified by:
decrement
in classio.qt.internal.AbstractSequentialConstIterator<T>
-
equals
Returns true if other points to the same item as this iterator; otherwise returns false.- Specified by:
equals
in classio.qt.internal.AbstractSequentialConstIterator<T>
-
equals
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.- Overrides:
equals
in classio.qt.internal.AbstractSequentialConstIterator<T>
- Parameters:
other
- other object- Returns:
- true if the native counterpart of the two objects are one and the same.
-
iterator
-
descendingIterator
-
value
Returns the value at iterator's position in the container or emptiness in case ofend
. -
checkedValue
Returns the current item's value if item is valid or throws NoSuchElementException otherwise.- Specified by:
checkedValue
in classio.qt.internal.AbstractSequentialConstIterator<T>
- Throws:
NoSuchElementException
-