Modifier and Type | Class and Description |
---|---|
static class |
BooleanFormatter.Type
Enum for holding the various types of boolean output.
|
Modifier and Type | Field and Description |
---|---|
private BooleanFormatter.Type |
type |
Constructor and Description |
---|
BooleanFormatter(BooleanFormatter.Type type)
Create a new boolean formatter.
|
Modifier and Type | Method and Description |
---|---|
String |
format(Boolean value)
Format a value by converting it to a string.
|
Boolean |
parseString(String value)
Parse a string and return a value of the correct type.
|
private final BooleanFormatter.Type type
public BooleanFormatter(BooleanFormatter.Type type)
type
- The type of outputpublic String format(Boolean value)
Formatter
public Boolean parseString(String value)
Formatter
parseString
in interface Formatter<Boolean>
value
- The string to parse