@Override
  public @NotNull ColoredText build() {
    flushLastFragment();
    int size = myFragments.size();
    if (size == 0) {
      return ColoredTextImpl.EMPTY;
    }
    else if (size == 1) {
      return new ColoredTextImpl(myFragments.get(0));
    }
    else {
      return new ColoredTextImpl(myFragments);
    }
  }
@Override
  public @NotNull ColoredText build()