code: @Override
      protected String naryOperator(final NAryOperator operator, final String opString) {
          final List<Formula> operands = new ArrayList<>();
          for (final Formula op : operator) {
              operands.add(op);
          }
          final int size = operator.numberOfOperands();
          Collections.sort(operands, this.comparator);
          final StringBuilder sb = new StringBuilder();
          int count = 0;
          Formula last = null;
          for (final Formula op : operands) {
              if (++count == size) {
                  last = op;
              } else {
                  sb.append(operator.type().precedence() < op.type().precedence() ? toString(op) : bracket(op));
                  sb.append(opString);
              }
          }
          if (last != null) {
              sb.append(operator.type().precedence() < last.type().precedence() ? toString(last) : bracket(last));
          }
          return sb.toString();
      }
docs: Returns the sorted string representation of an n-ary operator.
  
  @param operator the n-ary operator
  @param opString the operator string
  @return the string representation