private BTreeSet() {
}
@Override
public Iterator<InternalCacheEntry> iterator() {
final FastIterator fi;
try {
fi = tree.keys();
} catch (IOException e) {
throw new CacheException(e);
}
return new Iterator<InternalCacheEntry>() {
int entriesReturned = 0;
InternalCacheEntry current = null;
boolean next = true;
public boolean hasNext() {
if (current == null && next) {
Object key = fi.next();
if (key == null) {
next = false;
} else {
try {
current = unmarshall(tree.get(key), key);