public class DefaultAttributeFormatter extends AttributeFormatter
Modifier and Type | Field and Description |
---|---|
protected String |
printAfter |
protected boolean |
printAttributeName |
protected String |
printBefore |
protected String |
printBeforeValue |
protected StringBuilder |
tempBuffer |
protected ListFormatter |
valueFormat |
Constructor and Description |
---|
DefaultAttributeFormatter() |
DefaultAttributeFormatter(ListFormatter _valueFormat) |
DefaultAttributeFormatter(String _printBefore,
String _printAfter,
String _printBeforeValue,
boolean _printAttributeName,
ListFormatter _valueFormat) |
Modifier and Type | Method and Description |
---|---|
StringBuilder |
format(Attribute<?> att,
AttributeValue val,
StringBuilder out)
Format an attribute and its value as a string.
|
StringBuilder |
format(AttributeValueFormatter valueFormatter,
Attribute<?> att,
List<? extends AttributeValue> val,
StringBuilder out)
Format an attribute and its list of values as a string.
|
format
protected String printBefore
protected String printAfter
protected String printBeforeValue
protected boolean printAttributeName
protected ListFormatter valueFormat
protected StringBuilder tempBuffer
public DefaultAttributeFormatter()
public DefaultAttributeFormatter(ListFormatter _valueFormat)
public DefaultAttributeFormatter(String _printBefore, String _printAfter, String _printBeforeValue, boolean _printAttributeName, ListFormatter _valueFormat)
public StringBuilder format(AttributeValueFormatter valueFormatter, Attribute<?> att, List<? extends AttributeValue> val, StringBuilder out)
ValueListFormatter
valueFormatter
- The formatter must call
format
on this object to format values from the value list.val
- Value of the attribute. May be null
if the attribute is set but
has no value.out
- String buffer to which the formatted attribute is appended.public StringBuilder format(Attribute<?> att, AttributeValue val, StringBuilder out)
AttributeValueFormatter
val
- Value of the attribute. May be null
if the attribute is set but
has no value.out
- String buffer to which the formatted attribute is appended.Copyright © 2001-2013 the JGloss developers. All Rights Reserved.