@Test public void filter() { final Iterator<MigrationFile> iter = new MigrationsFilter( Arrays.asList( new MigrationFileFake(2), new MigrationFileFake(3), new MigrationFileFake(4), new MigrationFileFake(5) ), 3, 5 ).iterator(); MatcherAssert.assertThat( iter.next().version(), Matchers.equalTo(4) ); MatcherAssert.assertThat( iter.next().version(), Matchers.equalTo(5) ); MatcherAssert.assertThat( iter.hasNext(), Matchers.is(false) ); }
@Override public Iterator<MigrationFile> iterator() { return origin.iterator(); }
MigrationsFilter implements Iterable<MigrationFile> { @Override public Iterator<MigrationFile> iterator() { return origin.iterator(); } }
MigrationsFilter implements Iterable<MigrationFile> { @Override public Iterator<MigrationFile> iterator() { return origin.iterator(); } MigrationsFilter(
        @NonNull final Iterable<? extends MigrationFile> origin,
        final int versionStart,
        final int versionEnd
    ); }
MigrationsFilter implements Iterable<MigrationFile> { @Override public Iterator<MigrationFile> iterator() { return origin.iterator(); } MigrationsFilter(
        @NonNull final Iterable<? extends MigrationFile> origin,
        final int versionStart,
        final int versionEnd
    ); @Override Iterator<MigrationFile> iterator(); }
MigrationsFilter implements Iterable<MigrationFile> { @Override public Iterator<MigrationFile> iterator() { return origin.iterator(); } MigrationsFilter(
        @NonNull final Iterable<? extends MigrationFile> origin,
        final int versionStart,
        final int versionEnd
    ); @Override Iterator<MigrationFile> iterator();  }