Builder (@NotNull UndoConfirmationPolicy policy) { if (myUndoConfirmationPolicy != null) throw new IllegalStateException("do not call withUndoConfirmationPolicy() several times"); myUndoConfirmationPolicy = policy; return this; }