litesoft
Diff Revisions
23
vs
49
for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/widgets/datatables/LimitingIteratorWrapper.java
|
@@ -1,3 +1,4 @@ |
|
1 |
+ |
// This Source Code is in the Public Domain per: http://litesoft.org/License.txt |
1 |
2 |
|
package org.litesoft.GWT.client.widgets.datatables; |
2 |
3 |
|
|
3 |
4 |
|
import java.util.*; |
|
@@ -10,21 +11,21 @@ |
10 |
11 |
|
{ |
11 |
12 |
|
private final Iterator<RowType> mImpl; |
12 |
13 |
|
private final int mMaxRows; |
13 |
|
- |
|
|
14 |
+ |
|
14 |
15 |
|
int mCount = 0; |
15 |
|
- |
|
|
16 |
+ |
|
16 |
17 |
|
public LimitingIteratorWrapper(Iterator<RowType> pWrapped, int pMaxRows) |
17 |
18 |
|
{ |
18 |
19 |
|
mImpl = pWrapped; |
19 |
20 |
|
mMaxRows = pMaxRows; |
20 |
21 |
|
} |
21 |
|
- |
|
|
22 |
+ |
|
22 |
23 |
|
@Override |
23 |
24 |
|
public boolean hasNext() |
24 |
25 |
|
{ |
25 |
26 |
|
return mCount < mMaxRows && mImpl.hasNext(); |
26 |
27 |
|
} |
27 |
|
- |
|
|
28 |
+ |
|
28 |
29 |
|
@Override |
29 |
30 |
|
public RowType next() |
30 |
31 |
|
{ |
|
@@ -32,13 +33,13 @@ |
32 |
33 |
|
mCount++; |
33 |
34 |
|
return mImpl.next(); |
34 |
35 |
|
} |
35 |
|
- |
|
|
36 |
+ |
|
36 |
37 |
|
@Override |
37 |
38 |
|
public void remove() |
38 |
39 |
|
{ |
39 |
40 |
|
mImpl.remove(); |
40 |
41 |
|
} |
41 |
|
- |
|
|
42 |
+ |
|
42 |
43 |
|
@Override |
43 |
44 |
|
public String toString() |
44 |
45 |
|
{ |