source: trunk/doc/src/qiterator.qdoc@ 109

Last change on this file since 109 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 50.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the documentation of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42/*!
43 \class QListIterator
44 \inmodule QtCore
45
46 \brief The QListIterator class provides a Java-style const iterator for QList and QQueue.
47
48 QList has both \l{Java-style iterators} and \l{STL-style
49 iterators}. The Java-style iterators are more high-level and
50 easier to use than the STL-style iterators; on the other hand,
51 they are slightly less efficient.
52
53 An alternative to using iterators is to use index positions. Most
54 QList member functions take an index as their first parameter,
55 making it possible to access, modify, and remove items without
56 using iterators.
57
58 QListIterator\<T\> allows you to iterate over a QList\<T\> (or a
59 QQueue\<T\>). If you want to modify the list as you iterate over
60 it, use QMutableListIterator\<T\> instead.
61
62 The QListIterator constructor takes a QList as argument. After
63 construction, the iterator is located at the very beginning of
64 the list (before the first item). Here's how to iterate over all
65 the elements sequentially:
66
67 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 0
68
69 The next() function returns the next item in the list and
70 advances the iterator. Unlike STL-style iterators, Java-style
71 iterators point \e between items rather than directly \e at
72 items. The first call to next() advances the iterator to the
73 position between the first and second item, and returns the first
74 item; the second call to next() advances the iterator to the
75 position between the second and third item, and returns the second
76 item; and so on.
77
78 \img javaiterators1.png
79
80 Here's how to iterate over the elements in reverse order:
81
82 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 1
83
84 If you want to find all occurrences of a particular value, use
85 findNext() or findPrevious() in a loop.
86
87 Multiple iterators can be used on the same list. If the list is
88 modified while a QListIterator is active, the QListIterator will
89 continue iterating over the original list, ignoring the modified
90 copy.
91
92 \sa QMutableListIterator, QList::const_iterator
93*/
94
95/*!
96 \class QLinkedListIterator
97 \inmodule QtCore
98
99 \brief The QLinkedListIterator class provides a Java-style const iterator for QLinkedList.
100
101 QLinkedList has both \l{Java-style iterators} and
102 \l{STL-style iterators}. The Java-style iterators are more
103 high-level and easier to use than the STL-style iterators; on the
104 other hand, they are slightly less efficient.
105
106 QLinkedListIterator\<T\> allows you to iterate over a
107 QLinkedList\<T\>. If you want to modify the list as you iterate
108 over it, use QMutableLinkedListIterator\<T\> instead.
109
110 The QLinkedListIterator constructor takes a QLinkedList as
111 argument. After construction, the iterator is located at the very
112 beginning of the list (before the first item). Here's how to
113 iterate over all the elements sequentially:
114
115 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 2
116
117 The next() function returns the next item in the list and
118 advances the iterator. Unlike STL-style iterators, Java-style
119 iterators point \e between items rather than directly \e at
120 items. The first call to next() advances the iterator to the
121 position between the first and second item, and returns the first
122 item; the second call to next() advances the iterator to the
123 position between the second and third item, and returns the second
124 item; and so on.
125
126 \img javaiterators1.png
127
128 Here's how to iterate over the elements in reverse order:
129
130 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 3
131
132 If you want to find all occurrences of a particular value, use
133 findNext() or findPrevious() in a loop.
134
135 Multiple iterators can be used on the same list. If the list is
136 modified while a QLinkedListIterator is active, the
137 QLinkedListIterator will continue iterating over the original
138 list, ignoring the modified copy.
139
140 \sa QMutableLinkedListIterator, QLinkedList::const_iterator
141*/
142
143/*!
144 \class QVectorIterator
145 \inmodule QtCore
146 \brief The QVectorIterator class provides a Java-style const iterator for QVector and QStack.
147
148 QVector has both \l{Java-style iterators} and \l{STL-style
149 iterators}. The Java-style iterators are more high-level and
150 easier to use than the STL-style iterators; on the other hand,
151 they are slightly less efficient.
152
153 An alternative to using iterators is to use index positions. Most
154 QVector member functions take an index as their first parameter,
155 making it possible to access, insert, and remove items without
156 using iterators.
157
158 QVectorIterator\<T\> allows you to iterate over a QVector\<T\>
159 (or a QStack\<T\>). If you want to modify the vector as you
160 iterate over it, use QMutableVectorIterator\<T\> instead.
161
162 The QVectorIterator constructor takes a QVector as argument.
163 After construction, the iterator is located at the very beginning
164 of the vector (before the first item). Here's how to iterate over
165 all the elements sequentially:
166
167 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 4
168
169 The next() function returns the next item in the vector and
170 advances the iterator. Unlike STL-style iterators, Java-style
171 iterators point \e between items rather than directly \e at
172 items. The first call to next() advances the iterator to the
173 position between the first and second item, and returns the first
174 item; the second call to next() advances the iterator to the
175 position between the second and third item, returning the second
176 item; and so on.
177
178 \img javaiterators1.png
179
180 Here's how to iterate over the elements in reverse order:
181
182 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 5
183
184 If you want to find all occurrences of a particular value, use
185 findNext() or findPrevious() in a loop.
186
187 Multiple iterators can be used on the same vector. If the vector
188 is modified while a QVectorIterator is active, the QVectorIterator
189 will continue iterating over the original vector, ignoring the
190 modified copy.
191
192 \sa QMutableVectorIterator, QVector::const_iterator
193*/
194
195/*!
196 \class QSetIterator
197 \inmodule QtCore
198 \brief The QSetIterator class provides a Java-style const iterator for QSet.
199
200 QSet supports both \l{Java-style iterators} and \l{STL-style
201 iterators}. The Java-style iterators are more high-level and
202 easier to use than the STL-style iterators; on the other hand,
203 they are slightly less efficient.
204
205 QSetIterator\<T\> allows you to iterate over a QSet\<T\>. If you
206 want to modify the set as you iterate over it, use
207 QMutableSetIterator\<T\> instead.
208
209 The constructor takes a QSet as argument. After construction, the
210 iterator is located at the very beginning of the set (before
211 the first item). Here's how to iterate over all the elements
212 sequentially:
213
214 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 6
215
216 The next() function returns the next item in the set and
217 advances the iterator. Unlike STL-style iterators, Java-style
218 iterators point \e between items rather than directly \e at
219 items. The first call to next() advances the iterator to the
220 position between the first and second item, and returns the first
221 item; the second call to next() advances the iterator to the
222 position between the second and third item, returning the second
223 item; and so on.
224
225 \img javaiterators1.png
226
227 Here's how to iterate over the elements in reverse order:
228
229 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 7
230
231 If you want to find all occurrences of a particular value, use
232 findNext() or findPrevious() in a loop.
233
234 Multiple iterators can be used on the same set. If the set
235 is modified while a QSetIterator is active, the QSetIterator
236 will continue iterating over the original set, ignoring the
237 modified copy.
238
239 \sa QMutableSetIterator, QSet::const_iterator
240*/
241
242/*!
243 \class QMutableListIterator
244 \inmodule QtCore
245
246 \brief The QMutableListIterator class provides a Java-style non-const iterator for QList and QQueue.
247
248 QList has both \l{Java-style iterators} and \l{STL-style
249 iterators}. The Java-style iterators are more high-level and
250 easier to use than the STL-style iterators; on the other hand,
251 they are slightly less efficient.
252
253 An alternative to using iterators is to use index positions. Most
254 QList member functions take an index as their first parameter,
255 making it possible to access, insert, and remove items without
256 using iterators.
257
258 QMutableListIterator\<T\> allows you to iterate over a QList\<T\>
259 (or a QQueue\<T\>) and modify the list. If you don't want to
260 modify the list (or have a const QList), use the slightly faster
261 QListIterator\<T\> instead.
262
263 The QMutableListIterator constructor takes a QList as argument.
264 After construction, the iterator is located at the very beginning
265 of the list (before the first item). Here's how to iterate over
266 all the elements sequentially:
267
268 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 8
269
270 The next() function returns the next item in the list and
271 advances the iterator. Unlike STL-style iterators, Java-style
272 iterators point \e between items rather than directly \e at
273 items. The first call to next() advances the iterator to the
274 position between the first and second item, and returns the first
275 item; the second call to next() advances the iterator to the
276 position between the second and third item, returning the second
277 item; and so on.
278
279 \img javaiterators1.png
280
281 Here's how to iterate over the elements in reverse order:
282
283 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 9
284
285 If you want to find all occurrences of a particular value, use
286 findNext() or findPrevious() in a loop.
287
288 If you want to remove items as you iterate over the list, use
289 remove(). If you want to modify the value of an item, use
290 setValue(). If you want to insert a new item in the list, use
291 insert().
292
293 Example:
294 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 10
295
296 The example traverses a list, replacing negative numbers with
297 their absolute values, and eliminating zeroes.
298
299 Only one mutable iterator can be active on a given list at any
300 time. Furthermore, no changes should be done directly to the list
301 while the iterator is active (as opposed to through the
302 iterator), since this could invalidate the iterator and lead to
303 undefined behavior.
304
305 \sa QListIterator, QList::iterator
306*/
307
308/*!
309 \class QMutableLinkedListIterator
310 \inmodule QtCore
311
312 \brief The QMutableLinkedListIterator class provides a Java-style non-const iterator for QLinkedList.
313
314 QLinkedList has both \l{Java-style iterators} and
315 \l{STL-style iterators}. The Java-style iterators are more
316 high-level and easier to use than the STL-style iterators; on the
317 other hand, they are slightly less efficient.
318
319 QMutableLinkedListIterator\<T\> allows you to iterate over a
320 QLinkedList\<T\> and modify the list. If you don't want to modify
321 the list (or have a const QLinkedList), use the slightly faster
322 QLinkedListIterator\<T\> instead.
323
324 The QMutableLinkedListIterator constructor takes a QLinkedList as
325 argument. After construction, the iterator is located at the very
326 beginning of the list (before the first item). Here's how to
327 iterate over all the elements sequentially:
328
329 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 11
330
331 The next() function returns the next item in the list and
332 advances the iterator. Unlike STL-style iterators, Java-style
333 iterators point \e between items rather than directly \e at
334 items. The first call to next() advances the iterator to the
335 position between the first and second item, and returns the first
336 item; the second call to next() advances the iterator to the
337 position between the second and third item, returning the second
338 item; and so on.
339
340 \img javaiterators1.png
341
342 Here's how to iterate over the elements in reverse order:
343
344 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 12
345
346 If you want to find all occurrences of a particular value, use
347 findNext() or findPrevious() in a loop.
348
349 If you want to remove items as you iterate over the list, use
350 remove(). If you want to modify the value of an item, use
351 setValue(). If you want to insert a new item in the list, use
352 insert().
353
354 Example:
355 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 13
356
357 The example traverses a list, replacing negative numbers with
358 their absolute values, and eliminating zeroes.
359
360 Only one mutable iterator can be active on a given list at any
361 time. Furthermore, no changes should be done directly to the list
362 while the iterator is active (as opposed to through the
363 iterator), since this could invalidate the iterator and lead to
364 undefined behavior.
365
366 \sa QLinkedListIterator, QLinkedList::iterator
367*/
368
369/*!
370 \class QMutableVectorIterator
371 \inmodule QtCore
372
373 \brief The QMutableVectorIterator class provides a Java-style non-const iterator for QVector and QStack.
374
375 QVector has both \l{Java-style iterators} and \l{STL-style
376 iterators}. The Java-style iterators are more high-level and
377 easier to use than the STL-style iterators; on the other hand,
378 they are slightly less efficient.
379
380 An alternative to using iterators is to use index positions. Most
381 QVector member functions take an index as their first parameter,
382 making it possible to access, insert, and remove items without
383 using iterators.
384
385 QMutableVectorIterator\<T\> allows you to iterate over a
386 QVector\<T\> and modify the vector. If you don't want to modify
387 the vector (or have a const QVector), use the slightly faster
388 QVectorIterator\<T\> instead.
389
390 The QMutableVectorIterator constructor takes a QVector as
391 argument. After construction, the iterator is located at the very
392 beginning of the list (before the first item). Here's how to
393 iterate over all the elements sequentially:
394
395 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 14
396
397 The next() function returns the next item in the vector and
398 advances the iterator. Unlike STL-style iterators, Java-style
399 iterators point \e between items rather than directly \e at
400 items. The first call to next() advances the iterator to the
401 position between the first and second item, and returns the first
402 item; the second call to next() advances the iterator to the
403 position between the second and third item, returning the second
404 item; and so on.
405
406 \img javaiterators1.png
407
408 Here's how to iterate over the elements in reverse order:
409
410 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 15
411
412 If you want to find all occurrences of a particular value, use
413 findNext() or findPrevious() in a loop.
414
415 If you want to remove items as you iterate over the vector, use
416 remove(). If you want to modify the value of an item, use
417 setValue(). If you want to insert a new item in the vector, use
418 insert().
419
420 Example:
421 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 16
422
423 The example traverses a vector, replacing negative numbers with
424 their absolute values, and eliminating zeroes.
425
426 Only one mutable iterator can be active on a given vector at any
427 time. Furthermore, no changes should be done directly to the
428 vector while the iterator is active (as opposed to through the
429 iterator), since this could invalidate the iterator and lead to
430 undefined behavior.
431
432 \sa QVectorIterator, QVector::iterator
433*/
434
435/*!
436 \class QMutableSetIterator
437 \inmodule QtCore
438 \since 4.2
439
440 \brief The QMutableSetIterator class provides a Java-style non-const iterator for QSet.
441
442 QSet has both \l{Java-style iterators} and \l{STL-style
443 iterators}. The Java-style iterators are more high-level and
444 easier to use than the STL-style iterators; on the other hand,
445 they are slightly less efficient.
446
447 QMutableSetIterator\<T\> allows you to iterate over a QSet\<T\>
448 and remove items from the set as you iterate. If you don't want
449 to modify the set (or have a const QSet), use the slightly faster
450 QSetIterator\<T\> instead.
451
452 The QMutableSetIterator constructor takes a QSet as argument.
453 After construction, the iterator is located at the very beginning
454 of the set (before the first item). Here's how to iterate over
455 all the elements sequentially:
456
457 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 17
458
459 The next() function returns the next item in the set and
460 advances the iterator. Unlike STL-style iterators, Java-style
461 iterators point \e between items rather than directly \e at
462 items. The first call to next() advances the iterator to the
463 position between the first and second item, and returns the first
464 item; the second call to next() advances the iterator to the
465 position between the second and third item, returning the second
466 item; and so on.
467
468 \img javaiterators1.png
469
470 Here's how to iterate over the elements in reverse order:
471
472 \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 18
473
474 If you want to remove items as you iterate over the set, use
475 remove().
476
477 Only one mutable iterator can be active on a given set at any
478 time. Furthermore, no changes should be done directly to the set
479 while the iterator is active (as opposed to through the
480 iterator), since this could invalidate the iterator and lead to
481 undefined behavior.
482
483 \sa QSetIterator, QSet::iterator
484*/
485
486/*!
487 \fn QListIterator::QListIterator(const QList<T> &list)
488 \fn QLinkedListIterator::QLinkedListIterator(const QLinkedList<T> &list)
489 \fn QMutableListIterator::QMutableListIterator(QList<T> &list)
490 \fn QMutableLinkedListIterator::QMutableLinkedListIterator(QLinkedList<T> &list)
491
492 Constructs an iterator for traversing \a list. The iterator is
493 set to be at the front of the list (before the first item).
494
495 \sa operator=()
496*/
497
498/*!
499 \fn QVectorIterator::QVectorIterator(const QVector<T> &vector)
500 \fn QMutableVectorIterator::QMutableVectorIterator(QVector<T> &vector)
501
502 Constructs an iterator for traversing \a vector. The iterator is
503 set to be at the front of the vector (before the first item).
504
505 \sa operator=()
506*/
507
508/*!
509 \fn QSetIterator::QSetIterator(const QSet<T> &set)
510 \fn QMutableSetIterator::QMutableSetIterator(QSet<T> &set)
511
512 Constructs an iterator for traversing \a set. The iterator is
513 set to be at the front of the set (before the first item).
514
515 \sa operator=()
516*/
517
518/*!
519 \fn QMutableListIterator::~QMutableListIterator()
520 \fn QMutableLinkedListIterator::~QMutableLinkedListIterator()
521 \fn QMutableVectorIterator::~QMutableVectorIterator()
522 \fn QMutableSetIterator::~QMutableSetIterator()
523
524 Destroys the iterator.
525
526 \sa operator=()
527*/
528
529/*! \fn QMutableListIterator &QMutableListIterator::operator=(QList<T> &list)
530 \fn QMutableLinkedListIterator &QMutableLinkedListIterator::operator=(QLinkedList<T> &list)
531 \fn QListIterator &QListIterator::operator=(const QList<T> &list)
532 \fn QLinkedListIterator &QLinkedListIterator::operator=(const QLinkedList<T> &list)
533
534 Makes the iterator operate on \a list. The iterator is set to be
535 at the front of the list (before the first item).
536
537 \sa toFront(), toBack()
538*/
539
540/*! \fn QVectorIterator &QVectorIterator::operator=(const QVector<T> &vector)
541 \fn QMutableVectorIterator &QMutableVectorIterator::operator=(QVector<T> &vector)
542
543 Makes the iterator operate on \a vector. The iterator is set to be
544 at the front of the vector (before the first item).
545
546 \sa toFront(), toBack()
547*/
548
549/*! \fn QSetIterator &QSetIterator::operator=(const QSet<T> &set)
550 \fn QMutableSetIterator &QMutableSetIterator::operator=(QSet<T> &set)
551
552 Makes the iterator operate on \a set. The iterator is set to be
553 at the front of the set (before the first item).
554
555 \sa toFront(), toBack()
556*/
557
558/*! \fn void QListIterator::toFront()
559 \fn void QLinkedListIterator::toFront()
560 \fn void QVectorIterator::toFront()
561 \fn void QSetIterator::toFront()
562 \fn void QMutableListIterator::toFront()
563 \fn void QMutableLinkedListIterator::toFront()
564 \fn void QMutableVectorIterator::toFront()
565 \fn void QMutableSetIterator::toFront()
566
567 Moves the iterator to the front of the container (before the
568 first item).
569
570 \sa toBack(), next()
571*/
572
573/*! \fn void QListIterator::toBack()
574 \fn void QLinkedListIterator::toBack()
575 \fn void QVectorIterator::toBack()
576 \fn void QSetIterator::toBack()
577 \fn void QMutableListIterator::toBack()
578 \fn void QMutableLinkedListIterator::toBack()
579 \fn void QMutableVectorIterator::toBack()
580 \fn void QMutableSetIterator::toBack()
581
582 Moves the iterator to the back of the container (after the last
583 item).
584
585 \sa toFront(), previous()
586*/
587
588/*! \fn bool QListIterator::hasNext() const
589 \fn bool QLinkedListIterator::hasNext() const
590 \fn bool QVectorIterator::hasNext() const
591 \fn bool QSetIterator::hasNext() const
592 \fn bool QMutableListIterator::hasNext() const
593 \fn bool QMutableLinkedListIterator::hasNext() const
594 \fn bool QMutableVectorIterator::hasNext() const
595 \fn bool QMutableSetIterator::hasNext() const
596
597 Returns true if there is at least one item ahead of the iterator,
598 i.e. the iterator is \e not at the back of the container;
599 otherwise returns false.
600
601 \sa hasPrevious(), next()
602*/
603
604/*! \fn const T &QListIterator::next()
605 \fn const T &QLinkedListIterator::next()
606 \fn const T &QVectorIterator::next()
607 \fn const T &QSetIterator::next()
608 \fn const T &QMutableSetIterator::next()
609
610 Returns the next item and advances the iterator by one position.
611
612 Calling this function on an iterator located at the back of the
613 container leads to undefined results.
614
615 \sa hasNext(), peekNext(), previous()
616*/
617
618/*! \fn T &QMutableListIterator::next()
619 \fn T &QMutableLinkedListIterator::next()
620 \fn T &QMutableVectorIterator::next()
621
622 Returns a reference to the next item, and advances the iterator
623 by one position.
624
625 Calling this function on an iterator located at the back of the
626 container leads to undefined results.
627
628 \sa hasNext(), peekNext(), previous()
629*/
630
631/*! \fn const T &QListIterator::peekNext() const
632 \fn const T &QLinkedListIterator::peekNext() const
633 \fn const T &QVectorIterator::peekNext() const
634 \fn const T &QSetIterator::peekNext() const
635 \fn const T &QMutableSetIterator::peekNext() const
636
637 Returns the next item without moving the iterator.
638
639 Calling this function on an iterator located at the back of the
640 container leads to undefined results.
641
642 \sa hasNext(), next(), peekPrevious()
643*/
644
645/*! \fn T &QMutableListIterator::peekNext() const
646 \fn T &QMutableLinkedListIterator::peekNext() const
647 \fn T &QMutableVectorIterator::peekNext() const
648
649 Returns a reference to the next item, without moving the iterator.
650
651 Calling this function on an iterator located at the back of the
652 container leads to undefined results.
653
654 \sa hasNext(), next(), peekPrevious()
655*/
656
657/*! \fn bool QListIterator::hasPrevious() const
658 \fn bool QLinkedListIterator::hasPrevious() const
659 \fn bool QVectorIterator::hasPrevious() const
660 \fn bool QSetIterator::hasPrevious() const
661 \fn bool QMutableListIterator::hasPrevious() const
662 \fn bool QMutableLinkedListIterator::hasPrevious() const
663 \fn bool QMutableVectorIterator::hasPrevious() const
664 \fn bool QMutableSetIterator::hasPrevious() const
665
666 Returns true if there is at least one item behind the iterator,
667 i.e. the iterator is \e not at the front of the container;
668 otherwise returns false.
669
670 \sa hasNext(), previous()
671*/
672
673/*! \fn const T &QListIterator::previous()
674 \fn const T &QLinkedListIterator::previous()
675 \fn const T &QVectorIterator::previous()
676 \fn const T &QSetIterator::previous()
677 \fn const T &QMutableSetIterator::previous()
678
679 Returns the previous item and moves the iterator back by one
680 position.
681
682 Calling this function on an iterator located at the front of the
683 container leads to undefined results.
684
685 \sa hasPrevious(), peekPrevious(), next()
686*/
687
688/*! \fn T &QMutableListIterator::previous()
689 \fn T &QMutableLinkedListIterator::previous()
690 \fn T &QMutableVectorIterator::previous()
691
692 Returns a reference to the previous item and moves the iterator
693 back by one position.
694
695 Calling this function on an iterator located at the front of the
696 container leads to undefined results.
697
698 \sa hasPrevious(), peekPrevious(), next()
699*/
700
701/*! \fn const T &QListIterator::peekPrevious() const
702 \fn const T &QLinkedListIterator::peekPrevious() const
703 \fn const T &QVectorIterator::peekPrevious() const
704 \fn const T &QSetIterator::peekPrevious() const
705 \fn const T &QMutableSetIterator::peekPrevious() const
706
707 Returns the previous item without moving the iterator.
708
709 Calling this function on an iterator located at the front of the
710 container leads to undefined results.
711
712 \sa hasPrevious(), previous(), peekNext()
713*/
714
715/*! \fn T &QMutableListIterator::peekPrevious() const
716 \fn T &QMutableLinkedListIterator::peekPrevious() const