@Test public void oneNodeAtMost() { final List<int[]> list = Lists.newArrayList(); IntArrayCallback callback = new ListCollector(list); for (int n = 0; n < 8; ++n) { list.clear(); TestUtils.generateSpecWithExactSum(n, 2 * n, callback); Collections.sort(list, IntArrayComparator.INSTANCE); BoundedRollup<Integer, LongContent> rollup = BoundedRollup.create(TestUtils.ZERO_LONG_CONTENT, 1); MapNode<Integer, LongContent> actual = createTree(list, rollup); Assert.assertEquals(MapNode.create(new LongContent(list.size()), ImmutableMap.<Integer, MapNode<Integer, LongContent>>of()), actual); } }
public static <K, V extends AdditiveValue<V>> BoundedRollup<K, V> create( V emptyValue, int maxNodes) { return new BoundedRollup<K, V>(maxNodes); }
BoundedRollup implements StreamingRollup<K, V> { public static <K, V extends AdditiveValue<V>> BoundedRollup<K, V> create( V emptyValue, int maxNodes) { return new BoundedRollup<K, V>(maxNodes); } }
BoundedRollup implements StreamingRollup<K, V> { public static <K, V extends AdditiveValue<V>> BoundedRollup<K, V> create( V emptyValue, int maxNodes) { return new BoundedRollup<K, V>(maxNodes); } private  BoundedRollup(int maxNodes); }
BoundedRollup implements StreamingRollup<K, V> { public static <K, V extends AdditiveValue<V>> BoundedRollup<K, V> create( V emptyValue, int maxNodes) { return new BoundedRollup<K, V>(maxNodes); } private  BoundedRollup(int maxNodes); static BoundedRollup<K, V> create(
      V emptyValue, int maxNodes); @Override void feedRow(Iterator<K> leafPath, V v); @Override MapNode<K, V> finish(); @Override String toString(); }
BoundedRollup implements StreamingRollup<K, V> { public static <K, V extends AdditiveValue<V>> BoundedRollup<K, V> create( V emptyValue, int maxNodes) { return new BoundedRollup<K, V>(maxNodes); } private  BoundedRollup(int maxNodes); static BoundedRollup<K, V> create(
      V emptyValue, int maxNodes); @Override void feedRow(Iterator<K> leafPath, V v); @Override MapNode<K, V> finish(); @Override String toString();  }