public static class StringUtils.ObjectStringifier extends Object
Constructor and Description |
---|
ObjectStringifier() |
Modifier and Type | Method and Description |
---|---|
int |
estimateBufferSize(Object value,
int defValueLength)
Estimates the buffer size required for the target String
This function should be fast and rather estimate to much than to little
|
boolean |
isIgnoreEmpty(String separator)
Returns whether or not to ignore empty values in arrays
|
String |
toString(Object value,
String defValue)
Convert a single root element
|
String |
toString(Object value,
String listTemplate,
String defValue)
Convert a single element inside an array or collection
|
public boolean isIgnoreEmpty(String separator)
separator
- the list separatorpublic String toString(Object value, String defValue)
value
- the value to convertdefValue
- the default valuepublic String toString(Object value, String listTemplate, String defValue)
value
- the value to convertlistTemplate
- the list templatedefValue
- the default valuepublic int estimateBufferSize(Object value, int defValueLength)
value
- the value for which to estimatedefValueLength
- the length of the default valueCopyright © 2008–2023 Apache Software Foundation. All rights reserved.