Exemple #1
0
 private void checkKeyType(RefTreeNode n, Class cl) {
   Assert.assertEquals(cl, n.getId().getClass());
   for (Object c : Util.iterable(n.getChildIterator())) checkKeyType((RefTreeNode) c, cl);
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 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;
 }