@Override
  @SuppressWarnings("unchecked")
  public final @NotNull ElementPatternCondition<T> getCondition() {
    if (myConditions == null) {
      return new ElementPatternCondition<>(myInitialCondition);
    }
    if (myConditions instanceof PatternCondition) {
      PatternCondition<? super T> singleCondition = (PatternCondition)myConditions;
      return new ElementPatternCondition<>(myInitialCondition, Collections.singletonList(singleCondition));
    }
    return new ElementPatternCondition<>(myInitialCondition, (List)myConditions);
  }
@Override
  @SuppressWarnings("unchecked")
  public final @NotNull ElementPatternCondition<T> getCondition()