actually use iterator interface for ParcelableFileCache in activities

This commit is contained in:
Vincent Breitmoser committed 2014-10-03 04:16:14 +02:00
1 parent 04c8d42436
commit 504064302b
4 files changed
+52 -19

No files matched your search

@@ -55,6 +55,10 @@ public class ParcelableFileCache<E extends Parcelable> {
mFilename = filename;
}
/** This method returns the number of entries as valid for the iterator
* received by the latest readCache operation. Yes, it is slightly
* peculiar.
*/
public int getNumEntries() {
return mNumEntries;
}
@@ -107,7 +111,7 @@ public class ParcelableFileCache<E extends Parcelable> {
throw new IOException(e);
}
// yes this is slightly sloppy data flow. WE WOULDN'T NEED THIS WITH TUPLE RETURN TYPES
// yes this is sloppy data flow. WE WOULDN'T NEED THIS WITH TUPLE RETURN TYPES
mNumEntries = ois.readInt();
return new Iterator<E>() {