mirror of https://github.com/apache/lucene.git
remove iterator implementation
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1183768 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7fe1d8effa
commit
332da4dff8
|
@ -47,25 +47,7 @@ public final class Document implements Iterable<IndexableField> {
|
|||
|
||||
@Override
|
||||
public Iterator<IndexableField> iterator() {
|
||||
|
||||
return new Iterator<IndexableField>() {
|
||||
private int fieldUpto = 0;
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return fieldUpto < fields.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IndexableField next() {
|
||||
return fields.get(fieldUpto++);
|
||||
}
|
||||
};
|
||||
return fields.iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue