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
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classprotected static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractFormatter(Collection<? extends DataSource> sources, String delimiter) Creates a Formatter that will format data form the specified sources. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified object to the data to be formatted.voidclear()Clears this formatter of any data that has been added for formatting.Gets the delimiter used by this Formatter.voidsetDelimiter(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, waitMethods 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:FormatterGets the delimiter used by this Formatter.- Specified by:
getDelimiterin interfaceFormatter- Returns:
-
setDelimiter
Description copied from interface:FormatterSets the delimiter used by this formatter.- Specified by:
setDelimiterin interfaceFormatter
-