Class AbstractFormatter

    • Constructor Detail

      • AbstractFormatter

        public AbstractFormatter​(Collection<? extends DataSource> sources,
                                 String delimiter)
        Creates a Formatter that will format data form the specified sources. The ids of the sources will become the header info.
        Parameters:
        sources -
    • Method Detail

      • clear

        public void clear()
        Clears this formatter of any data that has been added for formatting.
        Specified by:
        clear in interface Formatter
      • addData

        public void addData​(String id,
                            Object obj)
        Adds the specified object to the data to be formatted.
        Specified by:
        addData in interface Formatter
        Parameters:
        id - the id of the data to add
        obj - the object to add
      • getDelimiter

        public String getDelimiter()
        Description copied from interface: Formatter
        Gets the delimiter used by this Formatter.
        Specified by:
        getDelimiter in interface Formatter
        Returns:
      • setDelimiter

        public void setDelimiter​(String delimiter)
        Description copied from interface: Formatter
        Sets the delimiter used by this formatter.
        Specified by:
        setDelimiter in interface Formatter