@SuppressWarnings("SameParameterValue")
    final <N> N findParent(Class<N> type) {
      for (AbstractTreeNode<?> node = this; node != null; node = node.getParent()) {
        if (type.isInstance(node)) {
          return type.cast(node);
        }
      }
      return null;
    }
@SuppressWarnings("SameParameterValue")
    final <N> N findParent(Class<N> type)