Browse Source

remove _fields

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277411 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 21 years ago
parent
commit
618526faca
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      src/main/org/apache/tools/ant/taskdefs/repository/EnabledLibraryElementList.java

+ 10
- 9
src/main/org/apache/tools/ant/taskdefs/repository/EnabledLibraryElementList.java View File

@@ -44,8 +44,8 @@ public class EnabledLibraryElementList extends LinkedList {
* iterator through a list that skips everything that is not enabled * iterator through a list that skips everything that is not enabled
*/ */
private static class EnabledIterator implements Iterator { private static class EnabledIterator implements Iterator {
private Iterator _underlyingIterator;
private EnabledLibraryElement _next;
private Iterator underlyingIterator;
private EnabledLibraryElement next;




/** /**
@@ -54,7 +54,7 @@ public class EnabledLibraryElementList extends LinkedList {
* @param collection * @param collection
*/ */
EnabledIterator(Collection collection) { EnabledIterator(Collection collection) {
_underlyingIterator = collection.iterator();
underlyingIterator = collection.iterator();
} }




@@ -64,13 +64,14 @@ public class EnabledLibraryElementList extends LinkedList {
* @return * @return
*/ */
public boolean hasNext() { public boolean hasNext() {
while (_next == null && _underlyingIterator.hasNext()) {
EnabledLibraryElement candidate = (EnabledLibraryElement) _underlyingIterator.next();
while (next == null && underlyingIterator.hasNext()) {
EnabledLibraryElement candidate =
(EnabledLibraryElement) underlyingIterator.next();
if (candidate.getEnabled()) { if (candidate.getEnabled()) {
_next = candidate;
next = candidate;
} }
} }
return (_next != null);
return (next != null);
} }


/** /**
@@ -82,8 +83,8 @@ public class EnabledLibraryElementList extends LinkedList {
if (!hasNext()) { if (!hasNext()) {
throw new NoSuchElementException(); throw new NoSuchElementException();
} }
EnabledLibraryElement result = _next;
_next = null;
EnabledLibraryElement result = next;
next = null;
return result; return result;
} }




Loading…
Cancel
Save