@SuppressWarnings("unchecked") private static <T> void setRecursively0(final T c, final Handler<T> handler) { if (handler.condition(c)) { handler.action(c); } if (handler instanceof ConditionHandler && ((ConditionHandler<T>) handler).stopCondition(c)) { return; } List<Node> children = null; if (c instanceof Parent) { children = ((Parent) c).getChildrenUnmodifiable(); } if (children != null) { for (Node child : children) { if (child instanceof Parent) { setRecursively0((T) child, handler); } } } }