public class DumpString
extends java.lang.Object
implements java.io.Serializable
toString()
method. You can add the following things to a DumpString:
add(String, Object)
addLine(String)
addHeadline(String)
addList(Collection)
setPropertyFormat(boolean)
Constructor and Description |
---|
DumpString()
Creates an empty DumpString.
|
DumpString(boolean isPropertyFormat)
Creates a DumpString for writing key value pairs in property format.
|
DumpString(int indent)
Creates a DumpString with the given fixed property-key length.
|
DumpString(java.lang.String header) |
DumpString(java.lang.String header,
int headLineLength) |
DumpString(java.lang.String header,
int headLineLength,
int maxElements) |
Modifier and Type | Method and Description |
---|---|
DumpString |
add(java.lang.String key,
java.lang.Object value)
Use this method for dumping key value pairs.
|
void |
addArray(java.lang.Object[] array) |
void |
addArray(java.lang.String headline,
java.lang.Object[] array) |
void |
addHeadline(java.lang.String text)
Sets the length for a headline.
|
void |
addLine()
Prints a newline only.
|
DumpString |
addLine(java.lang.String text)
Prints the string with a trailing newline.
|
void |
addList(java.util.Collection coll) |
void |
addList(java.lang.String headline,
java.util.Collection coll) |
void |
addMap(java.util.Map map) |
void |
addMap(java.lang.String headline,
java.util.Map map) |
int |
getFixKeyLength() |
int |
getMaxKeyLength() |
void |
remove(java.lang.String key) |
void |
setFixKeyLength(int length)
Sets the key length for property printing to a fixed value.
|
void |
setHeadLineLength(int length) |
void |
setMaxElements(int maxElements)
Defines the maximum number of elements that are printed when a Collection, Map or Object[] ist
dumped.
|
void |
setPropertyFormat(boolean isPropertyFormat)
Forces key-value pairs to be printed in the java property format (key=value).
|
void |
setPropertySeparator(java.lang.String propSep) |
static java.lang.String |
sizeStringOf(java.util.Collection coll) |
static java.lang.String |
sizeStringOf(java.util.Map map) |
static java.lang.String |
sizeStringOf(java.lang.Object[] array) |
java.lang.String |
toString()
Returns the resulting string that has been printed into the buffer.
|
ToString |
toString(ToString s)
Fills the given ToString object with the key-value pairs of this DumpString
|
public DumpString()
public DumpString(java.lang.String header)
public DumpString(java.lang.String header, int headLineLength)
public DumpString(java.lang.String header, int headLineLength, int maxElements)
public DumpString(int indent)
public DumpString(boolean isPropertyFormat)
public void setPropertyFormat(boolean isPropertyFormat)
public void setMaxElements(int maxElements)
public void setFixKeyLength(int length)
public int getFixKeyLength()
public void addHeadline(java.lang.String text)
public void setHeadLineLength(int length)
public DumpString addLine(java.lang.String text)
public void addLine()
public DumpString add(java.lang.String key, java.lang.Object value)
public void addArray(java.lang.String headline, java.lang.Object[] array)
public void addArray(java.lang.Object[] array)
public void addList(java.lang.String headline, java.util.Collection coll)
public void addList(java.util.Collection coll)
public void addMap(java.lang.String headline, java.util.Map map)
public void addMap(java.util.Map map)
public int getMaxKeyLength()
public void remove(java.lang.String key)
public java.lang.String toString()
toString
in class java.lang.Object
public void setPropertySeparator(java.lang.String propSep)
public ToString toString(ToString s)
public static java.lang.String sizeStringOf(java.util.Collection coll)
public static java.lang.String sizeStringOf(java.util.Map map)
public static java.lang.String sizeStringOf(java.lang.Object[] array)
Copyright © 2014 EsprIT-Systems. All Rights Reserved.