public abstract class AbstractDescriptionWriter extends Object implements DescriptionWriter
Base class to help implementing DescriptionWriter
s.
Constructor and Description |
---|
AbstractDescriptionWriter() |
Modifier and Type | Method and Description |
---|---|
DescriptionWriter |
putField(String name,
Object value)
Put an object field into the description.
|
DescriptionWriter |
putList(String name,
Iterable<?> objects)
Put a field with a list of values, using the default describer.
|
public DescriptionWriter putField(String name, Object value)
DescriptionWriter
Put an object field into the description.
putField
in interface DescriptionWriter
name
- The field name. It cannot begin with an underscore.value
- The field value. It is described with Descriptions.defaultDescriber()
}.public DescriptionWriter putList(String name, Iterable<?> objects)
DescriptionWriter
Put a field with a list of values, using the default describer.
putList
in interface DescriptionWriter
name
- The field name.objects
- The list of objects.