public static class VObjectPropertyValues.SemiStructuredValueBuilder extends Object
Helper class for building "semi-structured" property values.
Semi-structured values contain multiple values separate by semicolons. Unlike structured values, each value cannot have their own comma-delimited list of sub-values. The order that the values are in usually matters.
Example:
SemiStructuredValueBuilder b = new SemiStructuredValueBuilder();
b.append("one").append(null).append("two").append("");
assertEquals("one;;two;", b.build());
assertEquals("one;;two", b.build(false));
| Constructor and Description |
|---|
SemiStructuredValueBuilder() |
| Modifier and Type | Method and Description |
|---|---|
VObjectPropertyValues.SemiStructuredValueBuilder |
append(Object value)
Appends a value to the semi-structured value.
|
String |
build(boolean escapeCommas,
boolean includeTrailingSemicolons)
Builds the semi-structured value string.
|
public SemiStructuredValueBuilder()
public VObjectPropertyValues.SemiStructuredValueBuilder append(Object value)
toString() method will be called to generate its string
representation. If the value is null, then an empty string will be
appended.value - the valuepublic String build(boolean escapeCommas, boolean includeTrailingSemicolons)
escapeCommas - true to escape comma characters, false not to.
Old-style syntax does not expect commas to be escaped in
semi-structured values.includeTrailingSemicolons - true to include the semicolon
delimiters of empty values at the end of the value string, false to
trim themCopyright © 2016–2018 Michael Angstadt. All rights reserved.