|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.jqno.equalsverifier.util.Formatter
public class Formatter
Formats a string with the contents of one or more objects.
If possible, uses each object's toString
method.
If this throws an exception, Formatter creates its own string
representation of the object, containing its class name and
the contents of its fields.
Method Summary | |
---|---|
String |
format()
Formats the message with the given objects. |
static Formatter |
of(String message,
Object... objects)
Factory method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Formatter of(String message, Object... objects)
message
- The string that will be formatted.
The substring %% represents the location where each
object's will string representation will be inserted.objects
- The objects whose string representation will be inserted
into the message string.
Formatter
.public String format()
IllegalStateException
- if the number of %%'s in the message does
not match the number of objects.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |