Package repast.simphony.data2
Class TabularFormatter
java.lang.Object
repast.simphony.data2.AbstractFormatter
repast.simphony.data2.TabularFormatter
- All Implemented Interfaces:
Formatter
Formats data in a tabular format with a user specified delimiter.
- 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
ConstructorDescriptionTabularFormatter
(Collection<? extends DataSource> sources, String delimiter) Creates a Formatter that will format data form the specified sources. -
Method Summary
Modifier and TypeMethodDescriptionFormats the data that has been added to this Formatter.Gets a list of the column names.Gets the type associated with this Formatter.Gets the ids of the formatted data sources, quoted and separated by the delimiter.Methods inherited from class repast.simphony.data2.AbstractFormatter
addData, clear, getDelimiter, setDelimiter
-
Constructor Details
-
TabularFormatter
Creates a Formatter that will format data form the specified sources. The ids of the sources will become the header info.- Parameters:
sources
-
-
-
Method Details
-
getColumnNames
Gets a list of the column names.- Returns:
-
getHeader
Gets the ids of the formatted data sources, quoted and separated by the delimiter.- Returns:
- the ids of the formatted data sources, quoted and separated by the delimiter.
-
formatData
Description copied from interface:Formatter
Formats the data that has been added to this Formatter.- Returns:
- the formatted data.
-
getFormatType
Description copied from interface:Formatter
Gets the type associated with this Formatter.- Returns:
- the type associated with this Formatter.
-