private static @NotNull ImmutableText valueOf(@NotNull CharSequence str) {
    if (str instanceof ByteArrayCharSequence) {
      return new ImmutableText(str);
    }
    if (str.length() == 0) {
      return EMPTY;
    }
    return new ImmutableText(str.toString());
  }
private static @NotNull ImmutableText valueOf(@NotNull CharSequence str)