public class BooleanFormatter extends java.lang.Object implements Formatter<java.lang.Boolean>
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 |
---|---|
java.lang.String |
format(java.lang.Boolean value)
Format a value by converting it to a string.
|
java.lang.Boolean |
parseString(java.lang.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 java.lang.String format(java.lang.Boolean value)
Formatter
public java.lang.Boolean parseString(java.lang.String value)
Formatter
parseString
in interface Formatter<java.lang.Boolean>
value
- The string to parse