Class SimpleFormat
- java.lang.Object
-
- com.google.javascript.jscomp.base.format.SimpleFormat
-
public final class SimpleFormat extends java.lang.Object
This is a hacked apart version of the Apache Harmony String.format class with all parts outside of the GWT subset removed. It will work for simple format commands but does not handle I18N and doesn't handle complex formatting options such as calendar entries and hashcodes. Formats arguments according to a format string (likeprintf
in C).
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
format(java.lang.String format, java.lang.Object... args)
Writes a formatted string to the output destination of theFormatter
.
-
-
-
Method Detail
-
format
public static java.lang.String format(java.lang.String format, java.lang.Object... args)
Writes a formatted string to the output destination of theFormatter
.- Parameters:
format
- a format string.args
- the arguments list used in theformat()
method. If there are more arguments than those specified by the format string, then the additional arguments are ignored.- Returns:
- this
Formatter
. - Throws:
IllegalFormatFlagsException
- if the format string is illegal or incompatible with the arguments, or if fewer arguments are sent than those required by the format string, or any other illegal situation.
-
-