/** @return the corresponding input @throws IOException doesn't throw */ @Override public CircularListInput<T> getInput() throws IOException { return new CircularListInput<>(new ArrayList<>(items)); }
/** @return next item */ @Override public T get() throws IOException { if(i >= size) { reset(); } return items.get(i ++); }
items.add(item); final Input itemInput = new CircularListInput(items); final OperationsBuilder opsBuilder = new DataOperationsBuilderImpl(0)
/** @param buffer buffer for the items @param maxCount the count limit @return the actual count of the items got in the buffer @throws EOFException doesn't throw */ @Override public int get(final List<T> buffer, final int maxCount) throws EOFException, IOException { int n = 0; while(n < maxCount) { if(i >= size) { reset(); } n += super.get(buffer, Math.min(size - i, maxCount - n)); } return n; }
items.add(item); final Input itemInput = new CircularListInput(items); final OperationsBuilder opsBuilder = new DataOperationsBuilderImpl(0)