Class ExampleListFormatter

  • All Implemented Interfaces:
    ListFormatter

    public class ExampleListFormatter
    extends Object
    implements ListFormatter
    Tutorial example list formatter.
    Version:
    $Id: ExampleListFormatter.java 7707 2006-04-12 17:30:19Z ian@caret.cam.ac.uk $
    Author:
    Stephan J. Schmidt
    • Constructor Detail

      • ExampleListFormatter

        public ExampleListFormatter()
    • Method Detail

      • format

        public void format​(Writer writer,
                           Linkable current,
                           String listComment,
                           Collection c,
                           String emptyText,
                           boolean showSize)
                    throws IOException
        Create a simple list.
        Specified by:
        format in interface ListFormatter
        Parameters:
        writer - Writer to write the list output to
        current - the current linkable
        listComment - String to display before the list
        c - Collection of Linkables, Snips or Nameables to display
        emptyText - Text to display if collection is empty
        showSize - If showSize is true then the size of the collection is displayed
        Throws:
        IOException