sbrt.shell.text
Interface ListFormat<E>

Type Parameters:
E - the type of element.
All Superinterfaces:
Formatter<java.util.List<? extends E>>, Parser<java.util.List<E>>
All Known Implementing Classes:
AbstractListFormat, PipeListFormat, TabListFormat, WhitespaceListFormat

public interface ListFormat<E>
extends Formatter<java.util.List<? extends E>>, Parser<java.util.List<E>>

This interface is used to represent list formats.

Author:
This interface was written and documented by Jeremiah Wright while in the Wagner lab.

Method Summary
 java.lang.String format(java.util.List<? extends E> list)
          Returns a formatted string representation of the provided list.
 Formatter<E> getElementFormatter()
          Returns the formatter for the elements of this list format.
 Parser<E> getElementParser()
          Returns the parser for the elements of this list format.
 java.util.List<E> parse(java.lang.String list)
          Parses the provided string and returns its corresponding collection of elements as a list.
 
Methods inherited from interface sbrt.shell.text.Formatter
format
 

Method Detail

format

java.lang.String format(java.util.List<? extends E> list)
Returns a formatted string representation of the provided list.

Parameters:
list - the list to be formatted.
Returns:
a formatted string representation of the provided list.

parse

java.util.List<E> parse(java.lang.String list)
Parses the provided string and returns its corresponding collection of elements as a list.

Specified by:
parse in interface Parser<java.util.List<E>>
Parameters:
list - the string to be parsed.
Returns:
the list of elements corresponding to the provided string.

getElementFormatter

Formatter<E> getElementFormatter()
Returns the formatter for the elements of this list format.

Returns:
the formatter for the elements of this list format.

getElementParser

Parser<E> getElementParser()
Returns the parser for the elements of this list format.

Returns:
the parser for the elements of this list format.