Methods Summary |
---|
private static synchronized void | add(org.apache.tools.ant.types.resources.FailFast f)
Set s = (Set) (MAP.get(f.parent));
if (s == null) {
s = new HashSet();
MAP.put(f.parent, s);
}
s.add(f);
|
private static synchronized void | failFast(org.apache.tools.ant.types.resources.FailFast f)
Set s = (Set) (MAP.get(f.parent));
if (!s.contains(f)) {
throw new ConcurrentModificationException();
}
|
public boolean | hasNext()Fulfill the Iterator contract.
if (wrapped == null) {
return false;
}
failFast(this);
return wrapped.hasNext();
|
static synchronized void | invalidate(java.lang.Object o)Invalidate any in-use Iterators from the specified Object.
Set s = (Set) (MAP.get(o));
if (s != null) {
s.clear();
}
|
public java.lang.Object | next()Fulfill the Iterator contract.
if (wrapped == null || !wrapped.hasNext()) {
throw new NoSuchElementException();
}
failFast(this);
try {
return wrapped.next();
} finally {
if (!wrapped.hasNext()) {
wrapped = null;
remove(this);
}
}
|
private static synchronized void | remove(org.apache.tools.ant.types.resources.FailFast f)
Set s = (Set) (MAP.get(f.parent));
if (s != null) {
s.remove(f);
}
|
public void | remove()Fulfill the Iterator contract.
throw new UnsupportedOperationException();
|