StandardToStringStyle¶
- public class org.apache.commons.lang3.builder.StandardToStringStyle extends ToStringStyle[source]¶
Works with
ToStringBuilderto create atoString.This class is intended to be used as a singleton. There is no need to instantiate a new style each time. Simply instantiate the class once, customize the values as required, and store the result in a public static final variable for the rest of the program to access.
- Since:
1.0
Constructors¶
Constructs a new instance. |
Methods¶
Gets the array end text. |
|
Gets the array separator text. |
|
Gets the array start text. |
|
Gets the content end text. |
|
Gets the content start text. |
|
Gets the field name value separator text. |
|
Gets the field separator text. |
|
Gets the text to output when |
|
Gets the end text to output when a |
|
Gets the text to output when a |
|
Gets the end text to output when an |
|
Gets the start text to output when an |
|
Tests whether to output array content detail. |
|
Tests whether full detail is used when the caller does not specify a detail level. |
|
Tests whether the field separator should be added at the end of each buffer. |
|
Tests whether the field separator should be added at the start of each buffer. |
|
Tests whether to use the class name. |
|
Tests whether to use the field names passed in. |
|
Tests whether to use the identity hash code. |
|
Tests whether short class names should be output. |
|
Sets whether to output array content detail. |
|
Sets the array end text. |
|
Sets the array separator text. |
|
Sets the array start text. |
|
Sets the content end text. |
|
Sets the content start text. |
|
Sets whether to use full detail when the caller doesn’t specify. |
|
Sets the field name value separator text. |
|
Sets the field separator text. |
|
Sets whether the field separator should be added at the end of each buffer. |
|
Sets whether the field separator should be added at the start of each buffer. |
|
Sets the text to output when |
|
Sets the end text to output when a |
|
Sets the start text to output when a |
|
Sets the end text to output when an |
|
Sets the start text to output when an |
|
Sets whether to use the class name. |
|
Sets whether to use the field names passed in. |
|
Sets whether to use the identity hash code. |
|
Sets whether to output short or long class names. |
- @Override public String getArrayEnd()[source]¶
Gets the array end text.
- Returns:
The current array end text
- @Override public String getArraySeparator()[source]¶
Gets the array separator text.
- Returns:
The current array separator text
- @Override public String getArrayStart()[source]¶
Gets the array start text.
- Returns:
The current array start text
- @Override public String getContentEnd()[source]¶
Gets the content end text.
- Returns:
The current content end text
- @Override public String getContentStart()[source]¶
Gets the content start text.
- Returns:
The current content start text
- @Override public String getFieldNameValueSeparator()[source]¶
Gets the field name value separator text.
- Returns:
The current field name value separator text
- @Override public String getFieldSeparator()[source]¶
Gets the field separator text.
- Returns:
The current field separator text
- @Override public String getNullText()[source]¶
Gets the text to output when
nullfound.- Returns:
The current text to output when
nullfound
- @Override public String getSizeEndText()[source]¶
Gets the end text to output when a
Collection,MaporArraysize is output.This is output after the size value.
- Returns:
The current end of size text
- @Override public String getSizeStartText()[source]¶
Gets the text to output when a
Collection,MaporArraysize is output.This is output before the size value.
- Returns:
The current start of size text
- @Override public String getSummaryObjectEndText()[source]¶
Gets the end text to output when an
Objectis output in summary mode.This is output after the size value.
- Returns:
The current end of summary text
- @Override public String getSummaryObjectStartText()[source]¶
Gets the start text to output when an
Objectis output in summary mode.This is output before the size value.
- Returns:
The current start of summary text
- @Override public boolean isArrayContentDetail()[source]¶
Tests whether to output array content detail.
- Returns:
The current array content detail setting
- @Override public boolean isDefaultFullDetail()[source]¶
Tests whether full detail is used when the caller does not specify a detail level.
- Returns:
The current defaultFullDetail flag
- @Override public boolean isFieldSeparatorAtEnd()[source]¶
Tests whether the field separator should be added at the end of each buffer.
- Returns:
fieldSeparatorAtEnd flag
- Since:
2.0
- @Override public boolean isFieldSeparatorAtStart()[source]¶
Tests whether the field separator should be added at the start of each buffer.
- Returns:
The fieldSeparatorAtStart flag
- Since:
2.0
- @Override public boolean isUseClassName()[source]¶
Tests whether to use the class name.
- Returns:
The current useClassName flag
- @Override public boolean isUseFieldNames()[source]¶
Tests whether to use the field names passed in.
- Returns:
The current useFieldNames flag
- @Override public boolean isUseIdentityHashCode()[source]¶
Tests whether to use the identity hash code.
- Returns:
The current useIdentityHashCode flag
- @Override public boolean isUseShortClassName()[source]¶
Tests whether short class names should be output.
- Returns:
The current useShortClassName flag
- Since:
2.0
- @Override public void setArrayContentDetail(boolean arrayContentDetail)[source]¶
Sets whether to output array content detail.
- Parameters:
arrayContentDetail – The new arrayContentDetail flag
- @Override public void setArrayEnd(String arrayEnd)[source]¶
Sets the array end text.
nullis accepted, but will be converted to an empty String.- Parameters:
arrayEnd – The new array end text
- @Override public void setArraySeparator(String arraySeparator)[source]¶
Sets the array separator text.
nullis accepted, but will be converted to an empty String.- Parameters:
arraySeparator – The new array separator text
- @Override public void setArrayStart(String arrayStart)[source]¶
Sets the array start text.
nullis accepted, but will be converted to an empty String.- Parameters:
arrayStart – The new array start text
- @Override public void setContentEnd(String contentEnd)[source]¶
Sets the content end text.
nullis accepted, but will be converted to an empty String.- Parameters:
contentEnd – The new content end text
- @Override public void setContentStart(String contentStart)[source]¶
Sets the content start text.
nullis accepted, but will be converted to an empty String.- Parameters:
contentStart – The new content start text
- @Override public void setDefaultFullDetail(boolean defaultFullDetail)[source]¶
Sets whether to use full detail when the caller doesn’t specify.
- Parameters:
defaultFullDetail – The new defaultFullDetail flag
- @Override public void setFieldNameValueSeparator(String fieldNameValueSeparator)[source]¶
Sets the field name value separator text.
nullis accepted, but will be converted to an empty String.- Parameters:
fieldNameValueSeparator – The new field name value separator text
- @Override public void setFieldSeparator(String fieldSeparator)[source]¶
Sets the field separator text.
nullis accepted, but will be converted to an empty String.- Parameters:
fieldSeparator – The new field separator text
- @Override public void setFieldSeparatorAtEnd(boolean fieldSeparatorAtEnd)[source]¶
Sets whether the field separator should be added at the end of each buffer.
- Parameters:
fieldSeparatorAtEnd – The fieldSeparatorAtEnd flag
- Since:
2.0
- @Override public void setFieldSeparatorAtStart(boolean fieldSeparatorAtStart)[source]¶
Sets whether the field separator should be added at the start of each buffer.
- Parameters:
fieldSeparatorAtStart – The fieldSeparatorAtStart flag
- Since:
2.0
- @Override public void setNullText(String nullText)[source]¶
Sets the text to output when
nullfound.nullis accepted, but will be converted to an empty String.- Parameters:
nullText – The new text to output when
nullfound
- @Override public void setSizeEndText(String sizeEndText)[source]¶
Sets the end text to output when a
Collection,MaporArraysize is output.This is output after the size value.
nullis accepted, but will be converted to an empty String.- Parameters:
sizeEndText – The new end of size text
- @Override public void setSizeStartText(String sizeStartText)[source]¶
Sets the start text to output when a
Collection,MaporArraysize is output.This is output before the size value.
nullis accepted, but will be converted to an empty String.- Parameters:
sizeStartText – The new start of size text
- @Override public void setSummaryObjectEndText(String summaryObjectEndText)[source]¶
Sets the end text to output when an
Objectis output in summary mode.This is output after the size value.
nullis accepted, but will be converted to an empty String.- Parameters:
summaryObjectEndText – The new end of summary text
- @Override public void setSummaryObjectStartText(String summaryObjectStartText)[source]¶
Sets the start text to output when an
Objectis output in summary mode.This is output before the size value.
nullis accepted, but will be converted to an empty String.- Parameters:
summaryObjectStartText – The new start of summary text
- @Override public void setUseClassName(boolean useClassName)[source]¶
Sets whether to use the class name.
- Parameters:
useClassName – The new useClassName flag
- @Override public void setUseFieldNames(boolean useFieldNames)[source]¶
Sets whether to use the field names passed in.
- Parameters:
useFieldNames – The new useFieldNames flag