|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.util.ToStringBuilder
public class ToStringBuilder
Provides common default behaviors for
Object.toString()
implementations.
Field Summary | |
---|---|
protected java.lang.StringBuilder |
buf
|
protected char |
delim
|
static char |
DELIM
|
Constructor Summary | |
---|---|
ToStringBuilder()
Default constructor, creates a new ToStringBuilder
instance which uses DELIM as the
default delimiter for the toString attributes. |
|
ToStringBuilder(char delim)
Creates a new ToStringBuilder
instance which uses the passed character as the
default delimiter for the toString attributes. |
Method Summary | |
---|---|
ToStringBuilder |
add(java.lang.Object... objects)
Appends the String representation of the passed
Object s to this ToStringBuilder WITHOUT
using a delimiter to seperate it from other toString
arguments. |
ToStringBuilder |
add(java.lang.Object o)
Appends the String representation of the passed
Object to this ToStringBuilder WITHOUT
using a delimiter to seperate it from other toString
arguments. |
ToStringBuilder |
addAll(java.lang.Iterable<?> it)
Appends the String representation of the passed
Iterable 's Object to this
ToStringBuilder WITHOUT using a delimiter
to seperate it from other toString arguments. |
ToStringBuilder |
append(char delimiter,
java.lang.Object... objects)
Appends the String representation of the passed
Object s to this ToStringBuilder . |
ToStringBuilder |
append(java.lang.Object... objects)
Appends the String representation of the passed
Object s to this ToStringBuilder . |
ToStringBuilder |
append(java.lang.Object o)
Appends the String representation of the passed
Object to this ToStringBuilder . |
ToStringBuilder |
append(java.lang.Object o,
char delimiter)
Appends the String representation of the passed
Object to this ToStringBuilder . |
ToStringBuilder |
appendAll(char delimiter,
java.lang.Iterable<?> it)
Appends the String representation of the passed
Iterable 's Object s to this ToStringBuilder . |
ToStringBuilder |
appendAll(java.lang.Iterable<?> it)
Appends the String representation of the passed
Iterable 's Object s to this
ToStringBuilder . |
static ToStringBuilder |
getBestFitInstance(java.lang.Object o)
Returns a new, empty ToStringBuilder instance that
fits most for the passed Object . |
static ToStringBuilder |
getDefaultInstance(java.lang.Object o)
Returns a new ToStringBuilder instance that
already contains the passed object's simple class
name as a first information. |
char |
getDelimiter()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char DELIM
protected java.lang.StringBuilder buf
protected char delim
Constructor Detail |
---|
public ToStringBuilder()
ToStringBuilder
instance which uses DELIM
as the
default delimiter for the toString attributes.
public ToStringBuilder(char delim)
ToStringBuilder
instance which uses the passed character as the
default delimiter for the toString attributes.
delim
- Method Detail |
---|
public static final ToStringBuilder getDefaultInstance(java.lang.Object o)
ToStringBuilder
instance that
already contains the passed object's simple class
name as a first information.
o
-
ToStringBuilder
instance with its
simple class name appended as first attribute.ToStringBuilder()
public static final ToStringBuilder getBestFitInstance(java.lang.Object o)
ToStringBuilder
instance that
fits most for the passed Object
.
o
-
ToStringBuilder
instance.public ToStringBuilder append(java.lang.Object o)
String
representation of the passed
Object
to this ToStringBuilder
.
If its not the first call a DELIM
iter will be used
to seperate the String
s.
o
-
ToStringBuilder
public ToStringBuilder append(java.lang.Object... objects)
String
representation of the passed
Object
s to this ToStringBuilder
.
A DELIM
iter will be used
to seperate the String
s.
objects
-
ToStringBuilder
public ToStringBuilder appendAll(java.lang.Iterable<?> it)
String
representation of the passed
Iterable
's Object
s to this
ToStringBuilder
.
A DELIM
iter will be used
to seperate the String
s.
objects
-
ToStringBuilder
public ToStringBuilder append(java.lang.Object o, char delimiter)
String
representation of the passed
Object
to this ToStringBuilder
.
If its not the first call the passed delimiter
will be used to seperate the String
s.
o
- delimiter
-
ToStringBuilder
public ToStringBuilder append(char delimiter, java.lang.Object... objects)
String
representation of the passed
Object
s to this ToStringBuilder
.
The passed delimiter will be used to seperate the
String
s.
delimiter
- objects
-
ToStringBuilder
public ToStringBuilder appendAll(char delimiter, java.lang.Iterable<?> it)
String
representation of the passed
Iterable
's Object
s to this ToStringBuilder
.
The passed delimiter will be used to seperate the
String
s.
delimiter
- it
-
ToStringBuilder
public ToStringBuilder add(java.lang.Object o)
String
representation of the passed
Object
to this ToStringBuilder
WITHOUT
using a delimiter to seperate it from other toString
arguments.
o
-
ToStringBuilder
public ToStringBuilder add(java.lang.Object... objects)
String
representation of the passed
Object
s to this ToStringBuilder
WITHOUT
using a delimiter to seperate it from other toString
arguments.
objects
-
ToStringBuilder
public ToStringBuilder addAll(java.lang.Iterable<?> it)
String
representation of the passed
Iterable
's Object
to this
ToStringBuilder
WITHOUT using a delimiter
to seperate it from other toString arguments.
it
-
ToStringBuilder
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public char getDelimiter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |