@Test public void testChunk() throws Exception { new LimitedListProgressListener(new DisabledProgressListener()).chunk( new Path("/", EnumSet.of(Path.Type.volume, Path.Type.directory)), AttributedList.<Path>emptyList() ); }
@Override public void chunk(final Path folder, final AttributedList<Path> list) throws ListCanceledException { if(folder.isRoot()) { if(list.size() >= container) { container += preferences.getInteger("browser.list.limit.container"); throw new ListCanceledException(list); } } if(list.size() >= directory) { directory += preferences.getInteger("browser.list.limit.directory"); throw new ListCanceledException(list); } }
LimitedListProgressListener implements ListProgressListener { @Override public void chunk(final Path folder, final AttributedList<Path> list) throws ListCanceledException { if(folder.isRoot()) { if(list.size() >= container) { container += preferences.getInteger("browser.list.limit.container"); throw new ListCanceledException(list); } } if(list.size() >= directory) { directory += preferences.getInteger("browser.list.limit.directory"); throw new ListCanceledException(list); } } }
LimitedListProgressListener implements ListProgressListener { @Override public void chunk(final Path folder, final AttributedList<Path> list) throws ListCanceledException { if(folder.isRoot()) { if(list.size() >= container) { container += preferences.getInteger("browser.list.limit.container"); throw new ListCanceledException(list); } } if(list.size() >= directory) { directory += preferences.getInteger("browser.list.limit.directory"); throw new ListCanceledException(list); } } LimitedListProgressListener(final ProgressListener delegate); }
LimitedListProgressListener implements ListProgressListener { @Override public void chunk(final Path folder, final AttributedList<Path> list) throws ListCanceledException { if(folder.isRoot()) { if(list.size() >= container) { container += preferences.getInteger("browser.list.limit.container"); throw new ListCanceledException(list); } } if(list.size() >= directory) { directory += preferences.getInteger("browser.list.limit.directory"); throw new ListCanceledException(list); } } LimitedListProgressListener(final ProgressListener delegate); @Override void message(final String message); @Override void chunk(final Path folder, final AttributedList<Path> list); @Override ListProgressListener reset(); }
LimitedListProgressListener implements ListProgressListener { @Override public void chunk(final Path folder, final AttributedList<Path> list) throws ListCanceledException { if(folder.isRoot()) { if(list.size() >= container) { container += preferences.getInteger("browser.list.limit.container"); throw new ListCanceledException(list); } } if(list.size() >= directory) { directory += preferences.getInteger("browser.list.limit.directory"); throw new ListCanceledException(list); } } LimitedListProgressListener(final ProgressListener delegate); @Override void message(final String message); @Override void chunk(final Path folder, final AttributedList<Path> list); @Override ListProgressListener reset();  }