fix build breakage due to missing isEmpty() methods

This commit is contained in:
Joel Dice
2007-11-07 09:48:09 -07:00
parent 4611c89dbe
commit fef3cddb9e
4 changed files with 24 additions and 1 deletions

View File

@ -45,6 +45,10 @@ public class Collections {
synchronized (lock) { return collection.size(); }
}
public boolean isEmpty() {
return size() == 0;
}
public synchronized boolean contains(T e) {
synchronized (lock) { return collection.contains(e); }
}
@ -77,7 +81,6 @@ public class Collections {
public void addAll(Collection<T> c) {
synchronized (lock) { ((Set<T>)collection).addAll(c); }
}
}
static class SynchronizedIterator<T> implements Iterator<T> {