code: private List<AbstractBaseDTNode<I, D>> updateDTTargets(List<TTTTransition<I, D>> transitions, boolean hard) {
  
          final List<AbstractBaseDTNode<I, D>> nodes = new ArrayList<>(transitions.size());
          final List<Word<I>> prefixes = new ArrayList<>(transitions.size());
  
          for (final TTTTransition<I, D> t : transitions) {
              if (!t.isTree()) {
                  AbstractBaseDTNode<I, D> dt = t.getNonTreeTarget();
  
                  nodes.add(dt);
                  prefixes.add(t.getAccessSequence());
              }
          }
  
          final Iterator<AbstractBaseDTNode<I, D>> leavesIter = dtree.sift(nodes, prefixes, hard).iterator();
          final List<AbstractBaseDTNode<I, D>> result = new ArrayList<>(transitions.size());
  
          for (final TTTTransition<I, D> t : transitions) {
              if (t.isTree()) {
                  result.add(t.getTreeTarget().dtLeaf);
              } else {
                  AbstractBaseDTNode<I, D> leaf = leavesIter.next();
                  t.setNonTreeTarget(leaf);
                  result.add(leaf);
              }
          }
  
          assert !leavesIter.hasNext();
          return result;
      }
docs: Bulk version of {@link #updateDTTarget(TTTTransition, boolean)}.