The QSetIterator class provides a Java style const iterator for QSet.
More...
template<class T>
class QSetIterator< T >
The QSetIterator class provides a Java style const iterator for QSet. For more information refer to Java style iterators.
- See also
- QMutableSetIterator, QSet::const_iterator
template<class T >
QSetIterator< T >::QSetIterator |
( |
const QSet< T > & |
set | ) |
|
|
inline |
Constructs an iterator for traversing set. The iterator is set to the beginning of the set before the first item.
- See also
- operator=()
template<class T >
QSetIterator< T >::~QSetIterator |
( |
| ) |
|
|
default |
template<class T >
bool QSetIterator< T >::findNext |
( |
const T & |
value | ) |
|
|
inline |
Searches for value starting from the current iterator position and moving forward. Returns true if the specified value is found, otherwise it returns false. If value is found the iterator is positioned just after the matching item, otherwise the iterator is positioned at the end of the container.
template<class T >
bool QSetIterator< T >::findPrevious |
( |
const T & |
value | ) |
|
|
inline |
Searches for value starting from the current iterator position and moving backward. Returns true if the specified value is found, otherwise it returns false. If value was found the iterator is positioned just before the matching item. Otherwise the iterator is positioned at the beginning of the container.
template<class T >
bool QSetIterator< T >::hasNext |
( |
| ) |
const |
|
inline |
Returns true if there is at least one item after the iterator, otherwise returns false.
- See also
- next()
template<class T >
bool QSetIterator< T >::hasPrevious |
( |
| ) |
const |
|
inline |
Returns true if there is at least one item before the iterator, otherwise returns false.
- See also
- next()
template<class T >
const T & QSetIterator< T >::next |
( |
| ) |
|
|
inline |
Returns a reference to the next item and advances the iterator by one position. Calling this method on an iterator located at the end of the container causes undefined behavior.
- See also
- hasNext(), peekNext()
template<class T >
QSetIterator & QSetIterator< T >::operator= |
( |
const QSet< T > & |
set | ) |
|
|
inline |
Sets the iterator to the beginning of the set before the first item.
- See also
- toFront(), toBack()
template<class T >
const T & QSetIterator< T >::peekNext |
( |
| ) |
const |
|
inline |
Returns a reference to the next item without moving the iterator. Calling this method on an iterator located at the end of the container causes undefined behavior.
- See also
- hasNext(), next()
template<class T >
const T & QSetIterator< T >::peekPrevious |
( |
| ) |
const |
|
inline |
Returns a reference to the previous item without moving the iterator. Calling this method on an iterator located at the beginning of the container causes undefined behavior.
- See also
- hasPrevious(), peekNext(), previous()
template<class T >
const T & QSetIterator< T >::previous |
( |
| ) |
|
|
inline |
Returns a reference to the previous item and moves the iterator back by one position. Calling this method on an iterator located at the beginning of the container causes undefined behavior.
- See also
- hasPrevious(), peekPrevious(), next()
template<class T >
void QSetIterator< T >::toBack |
( |
| ) |
|
|
inline |
Moves the iterator to the end of the container after the last item.
- See also
- toFront()
template<class T >
void QSetIterator< T >::toFront |
( |
| ) |
|
|
inline |
Moves the iterator to the beginning of the container before the first item.
- See also
- toBack(), next()