Package repast.simphony.data2
Class AbstractFormatter
java.lang.Object
repast.simphony.data2.AbstractFormatter
- All Implemented Interfaces:
Formatter
- Direct Known Subclasses:
LineFormatter
,TabularFormatter
Abstract base class for Formatters.
- Author:
- Nick Collier
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected static class
protected static class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractFormatter
(Collection<? extends DataSource> sources, String delimiter) Creates a Formatter that will format data form the specified sources. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the specified object to the data to be formatted.void
clear()
Clears this formatter of any data that has been added for formatting.Gets the delimiter used by this Formatter.void
setDelimiter
(String delimiter) Sets the delimiter used by this formatter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface repast.simphony.data2.Formatter
formatData, getFormatType, getHeader
-
Field Details
-
keyMap
-
data
-
delimiter
-
-
Constructor Details
-
AbstractFormatter
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
-
clear
public void clear()Clears this formatter of any data that has been added for formatting. -
addData
Adds the specified object to the data to be formatted. -
getDelimiter
Description copied from interface:Formatter
Gets the delimiter used by this Formatter.- Specified by:
getDelimiter
in interfaceFormatter
- Returns:
-
setDelimiter
Description copied from interface:Formatter
Sets the delimiter used by this formatter.- Specified by:
setDelimiter
in interfaceFormatter
-