@Test public void add() { final Item item = new Item(5); futureItems.add(item); assertThat(futureItems.size()).isEqualTo(1); assertThat(futureItems.contains(item)).isTrue(); }
public void add(final T item) { final UInt64 slot = slotFunction.apply(item); LOG.trace("Save future item at slot {} for later import: {}", slot, item); queuedFutureItems.computeIfAbsent(slot, key -> createNewSet()).add(item); }
FutureItems { public void add(final T item) { final UInt64 slot = slotFunction.apply(item); LOG.trace("Save future item at slot {} for later import: {}", slot, item); queuedFutureItems.computeIfAbsent(slot, key -> createNewSet()).add(item); } }
FutureItems { public void add(final T item) { final UInt64 slot = slotFunction.apply(item); LOG.trace("Save future item at slot {} for later import: {}", slot, item); queuedFutureItems.computeIfAbsent(slot, key -> createNewSet()).add(item); } FutureItems(final Function<T, UInt64> slotFunction); }
FutureItems { public void add(final T item) { final UInt64 slot = slotFunction.apply(item); LOG.trace("Save future item at slot {} for later import: {}", slot, item); queuedFutureItems.computeIfAbsent(slot, key -> createNewSet()).add(item); } FutureItems(final Function<T, UInt64> slotFunction); void add(final T item); List<T> prune(final UInt64 currentSlot); boolean contains(final T item); int size(); }
FutureItems { public void add(final T item) { final UInt64 slot = slotFunction.apply(item); LOG.trace("Save future item at slot {} for later import: {}", slot, item); queuedFutureItems.computeIfAbsent(slot, key -> createNewSet()).add(item); } FutureItems(final Function<T, UInt64> slotFunction); void add(final T item); List<T> prune(final UInt64 currentSlot); boolean contains(final T item); int size();  }