public StringBuilder( final String format, final Object... args ) { super( new FormatBuilder( format, args ) ); } }
/** * {@inheritDoc } */ @Override public String build() { resetLastBuild(); final Object args[] = BuilderFactory.buildToArray( getContent() ); if( locale == null ) { return setLastBuild( String.format( format, args ) ); } else { return setLastBuild( String.format( locale, format, args ) ); } }
/** * Returns a ContentBuilder suitable for formatting strings * * @return Builder * @see #createFormatBuilder(java.lang.String) * @see String#format(java.lang.String, java.lang.Object[]) */ public static final ContentBuilder<String> createFormatBuilder() { return new FormatBuilder(); }
/** * Returns a ContentBuilder suitable for formatting strings * * @param format Format string * @return Builder * @see #createFormatBuilder() * @see String#format(java.lang.String, java.lang.Object[]) */ public static final ContentBuilder<String> createFormatBuilder( final String format ) { return new FormatBuilder( format ); }
public StringBuilder() { super( new FormatBuilder() ); }
public StringBuilder( final String format ) { super( new FormatBuilder( format ) ); }
/** * Creates a builder for a static format string and a set of arguments. * * The arguments can be either pojo's or Builders (pojo's will be * converted into Builders as required). * * The returned Builder will only format the string at build time * * @param format Format string * @param args Arguments for the format * @return Builder */ public static final Builder<String> createFormatBuilder( final String format, final Object... args ) { return new FormatBuilder( format, args ); }
public final B setValue( final String value ) { return setValue( new FormatBuilder( value ) ); }