CsvValueDecorator implementations
| Modifier and Type | Class and Description |
|---|---|
| public static class | CsvValueDecorators.
Decorated that adds static prefix and suffix around value to decorate value; removes the same when un-decorating. |
| Modifier and Type | Field and Description |
|---|---|
| public static final CsvValueDecorator | OPTIONAL_BRACKETS_DECORATOR
|
| public static final CsvValueDecorator | STRICT_BRACKETS_DECORATOR
|
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static CsvValueDecorator | optionalPrefixSuffixDecorator(String prefix, String suffix)
Factory method for constructing a |
| public static CsvValueDecorator | requiredPrefixSuffixDecorator(String prefix, String suffix)
Factory method for constructing a |
| OPTIONAL_BRACKETS_DECORATOR | back to summary |
|---|---|
| public static final CsvValueDecorator OPTIONAL_BRACKETS_DECORATOR
| |
| STRICT_BRACKETS_DECORATOR | back to summary |
|---|---|
| public static final CsvValueDecorator STRICT_BRACKETS_DECORATOR
| |
| CsvValueDecorators | back to summary |
|---|---|
| public CsvValueDecorators() | |
| optionalPrefixSuffixDecorator | back to summary |
|---|---|
| public static CsvValueDecorator optionalPrefixSuffixDecorator(String prefix, String suffix) Factory method for constructing a | |
| requiredPrefixSuffixDecorator | back to summary |
|---|---|
| public static CsvValueDecorator requiredPrefixSuffixDecorator(String prefix, String suffix) Factory method for constructing a | |
StringPrefixSuffixDecorator#StringPrefixSuffixDecorator).
| Modifier and Type | Field and Description |
|---|---|
| protected final boolean | _optional
Whether existence of prefix and suffix decoration is optional
( |
| protected final String | _prefix
Decoration added before value being decorated: for example, if decorating
with brackets, this would be opening bracket |
| protected final String | _suffix
Decoration added after value being decorated: for example, if decorating
with brackets, this would be closing bracket |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | decorateValue(CsvGenerator
Generator that will be used for actual serialization gen, String Value to decorate plainValue)Implements com. Method called during serialization when encoding a value, to produce "decorated" value to include in output (possibly escaped and/or quoted). |
| public String | undecorateValue(CsvParser
Parser that was used to decode textual value from input parser, String Value from which to remove decorations, if any
(some decorators can allow optional decorations; others may fail
if none found) decoratedValue)Implements com. Method called during deserialization, to remove possible decoration
applied with |
| _optional | back to summary |
|---|---|
| protected final boolean _optional Whether existence of prefix and suffix decoration is optional
( | |
| _prefix | back to summary |
|---|---|
| protected final String _prefix Decoration added before value being decorated: for example, if decorating
with brackets, this would be opening bracket | |
| _suffix | back to summary |
|---|---|
| protected final String _suffix Decoration added after value being decorated: for example, if decorating
with brackets, this would be closing bracket | |
| StringPrefixSuffixDecorator | back to summary |
|---|---|
| public StringPrefixSuffixDecorator(String prefix, String suffix, boolean optional) | |
| decorateValue | back to summary |
|---|---|
| public String decorateValue(CsvGenerator gen, String plainValue) throws IOException Implements com. Doc from com. Method called during serialization when encoding a value,
to produce "decorated" value to include in output (possibly
escaped and/or quoted).
Note that possible escaping and/or quoting (as per configuration
of
| |
| undecorateValue | back to summary |
|---|---|
| public String undecorateValue(CsvParser parser, String decoratedValue) throws IOException Implements com. Doc from com. Method called during deserialization, to remove possible decoration
applied with
| |