Package repast.simphony.data2
Class LineFormatter
- java.lang.Object
-
- repast.simphony.data2.AbstractFormatter
-
- repast.simphony.data2.LineFormatter
-
- All Implemented Interfaces:
Formatter
public class LineFormatter extends AbstractFormatter
Formats data in single line in the following format: id: data, id: data, ...- Author:
- Nick Collier
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class repast.simphony.data2.AbstractFormatter
AbstractFormatter.ItemFormatter, AbstractFormatter.RuntimeTestFormatter, AbstractFormatter.StringFormatter
-
-
Field Summary
-
Fields inherited from class repast.simphony.data2.AbstractFormatter
data, delimiter, keyMap
-
-
Constructor Summary
Constructors Constructor Description LineFormatter(Collection<? extends DataSource> sources, String delimiter)
Creates a Formatter that will format data from the specified sources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatData()
Formats the data that has been added to this Formatter in id: data , id: data, ...FormatType
getFormatType()
Gets the type associated with this Formatter.String
getHeader()
Gets the header, if any, approriate to this formatter.-
Methods inherited from class repast.simphony.data2.AbstractFormatter
addData, clear, getDelimiter, setDelimiter
-
-
-
-
Constructor Detail
-
LineFormatter
public LineFormatter(Collection<? extends DataSource> sources, String delimiter)
Creates a Formatter that will format data from the specified sources. T- Parameters:
sources
-
-
-
Method Detail
-
getHeader
public String getHeader()
Description copied from interface:Formatter
Gets the header, if any, approriate to this formatter.- Returns:
- an empty string as this formatter has no header data.
-
formatData
public String formatData()
Formats the data that has been added to this Formatter in id: data , id: data, ...- Returns:
- the formatted data.
-
getFormatType
public FormatType getFormatType()
Description copied from interface:Formatter
Gets the type associated with this Formatter.- Returns:
- the type associated with this Formatter.
-
-