Self (@NotNull ElementPatternCondition<T> condition) { try { final ObjectPattern s = (ObjectPattern)clone(); s.myInitialCondition = condition.getInitialCondition(); List<PatternCondition<? super T>> conditions = condition.getConditions(); s.myConditions = conditions.isEmpty() ? null : conditions.size() == 1 ? conditions.get(0) : conditions; //noinspection unchecked return (Self)s; } catch (CloneNotSupportedException e) { throw new RuntimeException(e); } }