@Test public void minusCollisionMinus100() { Node<Integer, Integer> node = HAMT.<Integer, Integer>empty(); for (int i = 100; i > 0; i--) { node = node.plus(0, i * 30000, i * 30000, i); } Node<Integer, Integer> node2 = node.plus(0, 10, 100, 80).plus(0, 10, 110, -1); assertThat(node2.size(), equalTo(102)); System.out.println(node + " " + node.size()); Node<Integer, Integer> node3 = node2.minus(0, 10, 110); assertThat(node3.size(), equalTo(101)); Node<Integer, Integer> node4 = node2.minus(0, 10, 100); assertThat(node4.size(), equalTo(101)); Node<Integer, Integer> node5 = node2.minus(0, 10, 8000); assertThat(node5.size(), equalTo(102)); for (int i = 100; i > 0; i--) { node = node.minus(0, i * 30000, i * 30000); } assertThat(node.size(), equalTo(0)); }
public static <K, V> Node<K, V> empty() { return EmptyNode.Instance; }
HAMT implements Serializable { public static <K, V> Node<K, V> empty() { return EmptyNode.Instance; } }
HAMT implements Serializable { public static <K, V> Node<K, V> empty() { return EmptyNode.Instance; }  }
HAMT implements Serializable { public static <K, V> Node<K, V> empty() { return EmptyNode.Instance; }  static Node<K, V> empty(); }
HAMT implements Serializable { public static <K, V> Node<K, V> empty() { return EmptyNode.Instance; }  static Node<K, V> empty();  }