ImportKeys: Extract interface and refactoring

ImportKeys: Extract interface and refactoring
This commit is contained in:
Andrea Torlaschi
2016-06-28 22:19:26 +02:00
parent 7cb13bf06f
commit db1e8b60ca
7 changed files with 48 additions and 41 deletions

View File

@@ -0,0 +1,17 @@
package org.sufficientlysecure.keychain.util;
import java.util.Iterator;
/**
* An extended iterator interface, which knows the total number of its entries beforehand.
*/
public interface IteratorWithSize<E> extends Iterator<E> {
/**
* Returns the total number of entries in this iterator.
*
* @return the number of entries in this iterator.
*/
int getSize();
}

View File

@@ -216,12 +216,4 @@ public class ParcelableFileCache<E extends Parcelable> {
return tempFile.delete();
}
/** As the name implies, this is an extended iterator interface, which
* knows the total number of its entries beforehand.
*/
public static interface IteratorWithSize<E> extends Iterator<E> {
/** Returns the number of total entries in this iterator. */
int getSize();
}
}