@Test public void put31DiffValues() throws Exception { Node<Integer, Integer> node = HAMT.<Integer, Integer>empty(); for (int i = 0; i < 32; i++) { Integer next = i; if (i == 31) { System.out.println("31"); System.out.println("Before : " + node); assertTrue(node.get(0, minusOne.hashCode(), minusOne).isPresent()); } node = node.plus(0, next.hashCode(), next, next); node = node.plus(0, next.hashCode(), next + 1, next + 1); node = node.plus(0, next.hashCode(), next + 2, next + 2); node = node.plus(0, next.hashCode(), next + 3, next + 3); if (i == 31) { System.out.println("After : " + node); } assertThat(node.toString(), node.get(0, next.hashCode(), next), equalTo(Option.some(next))); if (i == 10) { node = node.plus(0, minusOne.hashCode(), minusOne, minusOne); node = node.plus(0, minusOne.hashCode(), minusOne - 1, minusOne - 1); node = node.plus(0, minusOne.hashCode(), minusOne - 2, minusOne - 2); } } System.out.println(node); node = node.plus(0, minusOne.hashCode(), minusOne, minusOne); assertTrue(node.get(0, thirtyOne.hashCode(), thirtyOne).isPresent()); assertTrue(node.get(0, minusOne.hashCode(), minusOne).isPresent()); System.out.println(node); }
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();  }