Reify RecordPredicate for easier testing.

This commit is contained in:
akwizgran
2023-03-10 15:15:29 +00:00
parent f1ae57b213
commit 8d20c5d8b8
9 changed files with 62 additions and 40 deletions

View File

@@ -32,8 +32,15 @@ public interface RecordReader {
* 'accept' or 'ignore' predicates
*/
@Nullable
Record readRecord(Predicate<Record> accept, Predicate<Record> ignore)
Record readRecord(RecordPredicate accept, RecordPredicate ignore)
throws IOException;
void close() throws IOException;
/**
* Interface that reifies the generic interface {@code Predicate<Record>}
* for easier testing.
*/
interface RecordPredicate extends Predicate<Record> {
}
}