code: public static void addElement(@Nonnull StringBuilder buf, @Nonnull String separator, @Nonnull String element) {
          if (buf.length() > 0) {
              buf.append(separator);
          }
          buf.append(element);
      }
docs: Appends the separator string, if <code>{@link StringBuilder#length() buf.lenght()} &gt; 0</code> and then appends the element.