litesoft
Diff Revisions
49
vs
50
for /trunk/Java/core/Anywhere/src/org/litesoft/core/util/OnePushBackIterator.java
|
@@ -3,47 +3,6 @@ |
3 |
3 |
|
|
4 |
4 |
|
import java.util.*; |
5 |
5 |
|
|
6 |
|
- |
import org.litesoft.core.util.*; |
7 |
|
- |
|
8 |
|
- |
// Copyright Status: |
9 |
|
- |
// |
10 |
|
- |
// All Software available from LiteSoft.org (including this file) is |
11 |
|
- |
// hereby released into the public domain. |
12 |
|
- |
// |
13 |
|
- |
// It is free! As in, you may use it freely in both commercial and |
14 |
|
- |
// non-commercial applications, bundle it with your software |
15 |
|
- |
// distribution, include it on a CD-ROM, list the source code in a book, |
16 |
|
- |
// mirror the documentation at your own web site, or use it in any other |
17 |
|
- |
// way you see fit. |
18 |
|
- |
// |
19 |
|
- |
// NO Warranty! |
20 |
|
- |
// |
21 |
|
- |
// All software is provided "as is". |
22 |
|
- |
// |
23 |
|
- |
// There is ABSOLUTELY NO WARRANTY OF ANY KIND: not for the design, fitness |
24 |
|
- |
// (for a particular purpose), level of errors (or lack thereof), or |
25 |
|
- |
// applicability of this software. The entire risk as to the quality |
26 |
|
- |
// and performance of this software is with you. Should this software |
27 |
|
- |
// prove defective, you assume the cost of all necessary servicing, repair |
28 |
|
- |
// or correction. |
29 |
|
- |
// |
30 |
|
- |
// In no event unless required by applicable law or agreed to in writing |
31 |
|
- |
// will any party who created or may modify and/or redistribute this |
32 |
|
- |
// software, be liable to you for damages, including any general, |
33 |
|
- |
// special, incidental or consequential damages arising out of the use or |
34 |
|
- |
// inability to use this software (including but not limited to loss of |
35 |
|
- |
// data or data being rendered inaccurate or losses sustained by you or |
36 |
|
- |
// third parties or a failure of this software to operate with any |
37 |
|
- |
// other programs), even if such holder or other party has been advised |
38 |
|
- |
// of the possibility of such damages. |
39 |
|
- |
// |
40 |
|
- |
// NOTE: Should you discover a bug, have a recogmendation for a change, wish |
41 |
|
- |
// to submit modifications, or wish to add new classes/functionality, |
42 |
|
- |
// please email them to: |
43 |
|
- |
// |
44 |
|
- |
// changes@litesoft.org |
45 |
|
- |
// |
46 |
|
- |
|
47 |
6 |
|
/** |
48 |
7 |
|
* An Iterator, of another wrapped Iterator, that adds the ability to |
49 |
8 |
|
* <i>pushBack</i> (or repeat) any ONE object just retrieved via |
|
@@ -87,6 +46,7 @@ |
87 |
46 |
|
* |
88 |
47 |
|
* @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/Util/Iterator.html#hasNext()">java.util.Iterator#hasNext()</a> |
89 |
48 |
|
*/ |
|
49 |
+ |
@Override |
90 |
50 |
|
public boolean hasNext() |
91 |
51 |
|
{ |
92 |
52 |
|
return lastValid || super.hasNext(); |
|
@@ -97,6 +57,7 @@ |
97 |
57 |
|
* |
98 |
58 |
|
* @see <a href="http://java.sun.com/j2se/1.3/docs/api/java/lang/Util/Iterator.html#next()">java.util.Iterator#next()</a> |
99 |
59 |
|
*/ |
|
60 |
+ |
@Override |
100 |
61 |
|
public T next() |
101 |
62 |
|
{ |
102 |
63 |
|
if ( !hasNext() ) |