Adapt to the new google-collect jar. Thanks Charlie.

This commit is contained in:
Par Winzell
2009-11-11 20:41:31 +00:00
parent 6d745b4247
commit 4c21819f22
+9 -9
View File
@@ -177,10 +177,10 @@ public abstract class KeySet<T extends PersistentRecord> extends WhereClause
// from Iterable<Key<T>> // from Iterable<Key<T>>
public Iterator<Key<T>> iterator () { public Iterator<Key<T>> iterator () {
return Iterators.transform( return Iterators.transform(
Iterators.forArray(_keys, 0, _keys.length), new Function<Comparable<?>, Key<T>>() { Iterators.forArray(_keys), new Function<Comparable<?>, Key<T>>() {
public Key<T> apply (Comparable<?> key) { public Key<T> apply (Comparable<?> key) {
return new Key<T>(_pClass, new Comparable<?>[] { key }); return new Key<T>(_pClass, new Comparable<?>[] { key });
} }
}); });
} }
@@ -230,11 +230,11 @@ public abstract class KeySet<T extends PersistentRecord> extends WhereClause
// from Iterable<Key<T>> // from Iterable<Key<T>>
public Iterator<Key<T>> iterator () { public Iterator<Key<T>> iterator () {
return Iterators.transform(Iterators.forArray(_keys, 0, _keys.length), return Iterators.transform(
new Function<Comparable<?>[], Key<T>>() { Iterators.forArray(_keys), new Function<Comparable<?>[], Key<T>>() {
public Key<T> apply (Comparable<?>[] key) { public Key<T> apply (Comparable<?>[] key) {
return new Key<T>(_pClass, key); return new Key<T>(_pClass, key);
} }
}); });
} }