public class ImmutableValueModel extends Object implements ValueModel
| Modifier and Type | Field and Description |
|---|---|
private Comment[] |
comments |
(package private) static String |
lineSeparator |
private char |
separator |
private static long |
serialVersionUID |
private String[] |
values |
| Constructor and Description |
|---|
ImmutableValueModel()
Produces an empty or null model
|
ImmutableValueModel(Comment[] comments,
char sep,
String... values) |
ImmutableValueModel(Comment[] comments,
String... values) |
ImmutableValueModel(List<String> comments,
char sep,
List<String> values) |
ImmutableValueModel(String... values) |
| Modifier and Type | Method and Description |
|---|---|
String |
asKeyValueRep(String key)
Output a reasonable representation of what the text for this key value pair would look like
|
ValueModel |
cloneImmutable() |
List<String> |
getComments() |
char |
getSeparator() |
String |
getValue()
Concatenates the values
|
List<String> |
getValues() |
String |
toString() |
String |
toXML(int spaces) |
protected String |
toXMLCompatibilityMode(int spaces) |
private static final long serialVersionUID
private final char separator
private final String[] values
private final Comment[] comments
static final String lineSeparator
public ImmutableValueModel()
public ImmutableValueModel(String... values)
public char getSeparator()
getSeparator in interface ValueModelpublic List<String> getComments()
getComments in interface ValueModelpublic List<String> getValues()
getValues in interface ValueModelpublic String getValue()
ValueModelgetValue in interface ValueModelpublic String toXML(int spaces)
toXML in interface ValueModelprotected String toXMLCompatibilityMode(int spaces)
public String asKeyValueRep(String key)
ValueModelasKeyValueRep in interface ValueModelpublic ValueModel cloneImmutable()
cloneImmutable in interface ValueModelCopyright © 2011–2016 David R. Smith. All rights reserved.