private void checkKeyType(RefTreeNode n, Class cl) { Assert.assertEquals(cl, n.getId().getClass()); for (Object c : Util.iterable(n.getChildIterator())) checkKeyType((RefTreeNode) c, cl); }
private void randomSelection(RefTreeNode n, Set<Key> ks, int ppm, Random rnd) { if ((rnd.nextInt() & 1023) <= ppm) ks.add(n.getId()); for (Object c : Util.iterable(n.getChildIterator())) randomSelection((RefTreeNode) c, ks, ppm, rnd); }
private Set<Key> buildSet(RefTreeNode n, Set<Key> s) { s.add(n.getId()); for (Object c : Util.iterable(n.getChildIterator())) buildSet((RefTreeNode) c, s); return s; }