@Test public void add() { final SampleBuffer<Double> buffer = new SampleBuffer<>(33); for (int i = 0; i < 10; ++i) { buffer.add(Sample.ofDouble(i, 2*i)); } Assert.assertEquals(buffer.samples(), List.of()); }
public void add(final Sample<T> sample) { _buffer.add(requireNonNull(sample)); }
SampleBuffer implements Sampling<T> { public void add(final Sample<T> sample) { _buffer.add(requireNonNull(sample)); } }
SampleBuffer implements Sampling<T> { public void add(final Sample<T> sample) { _buffer.add(requireNonNull(sample)); } SampleBuffer(final int size); }
SampleBuffer implements Sampling<T> { public void add(final Sample<T> sample) { _buffer.add(requireNonNull(sample)); } SampleBuffer(final int size); void add(final Sample<T> sample); void addAll(final Collection<? extends Sample<T>> samples); @SuppressWarnings({"unchecked", "rawtypes"}) int publish(); @Override Result<T> eval(final Tree<? extends Op<T>, ?> program); }
SampleBuffer implements Sampling<T> { public void add(final Sample<T> sample) { _buffer.add(requireNonNull(sample)); } SampleBuffer(final int size); void add(final Sample<T> sample); void addAll(final Collection<? extends Sample<T>> samples); @SuppressWarnings({"unchecked", "rawtypes"}) int publish(); @Override Result<T> eval(final Tree<? extends Op<T>, ?> program);  }