public abstract class AbstractField extends Object implements Field
 An abstract Field implementation.
 
| Constructor and Description | 
|---|
AbstractField(boolean nameless,
             boolean empty)
 Creates a field. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected String | 
formatValue(String value)
 Formats the specified value. 
 | 
String | 
getFormattedValue()
 Returns the value. 
 | 
boolean | 
isEmpty()
 Returns the flag if the field is an empty field. 
 | 
boolean | 
isNameless()
 Returns the flag if the field has no name. 
 | 
public AbstractField(boolean nameless,
                     boolean empty)
Creates a field.
nameless - The flag if the field is a nameless field.empty - The flag if the field is an empty field.protected String formatValue(String value)
Formats the specified value.
All empty lines are filled with a ".".
value - The value.public boolean isNameless()
FieldReturns the flag if the field has no name.
An nameless field has no name, but a value.
isNameless in interface Fieldtrue, if the field has no name,
         false otherwise.Field.getName()public String getFormattedValue()
FieldReturns the value.
The value can contain newlines. All "." lines are replaced by empty lines.
getFormattedValue in interface Fieldnull, if the field is an empty field.Field.isEmpty()public boolean isEmpty()
FieldReturns the flag if the field is an empty field.
An empty field has no name and no value.
isEmpty in interface Fieldtrue, if the field is an empty field.Field.getName(), 
Field.getValue()Copyright © 2015–2019. All rights reserved.