sbrt.shell.text
Class TabListFormat<E>

java.lang.Object
  extended by sbrt.shell.text.AbstractListFormat<E>
      extended by sbrt.shell.text.TabListFormat<E>
Type Parameters:
E - the element type.
All Implemented Interfaces:
Formatter<java.util.List<? extends E>>, ListFormat<E>, Parser<java.util.List<E>>

public final class TabListFormat<E>
extends AbstractListFormat<E>

This class is used to define a format for tab-delimited lists. If a list is composed of elements a, b, c, its string representation would be "a\tb\tc", where \t is the tab character.

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

Constructor Summary
TabListFormat(Formatter<E> elementFormatter, Parser<E> elementParser)
          Constructs a new tab-delimited list format with the provided element format.
TabListFormat(SimpleFormat<E> elementFormat)
          Constructs a new tab-delimited list format with the provided element format.
 
Method Summary
static TabListFormat<java.lang.String> getBasic()
          Returns a TabListFormat that does not format or parse the elements supplied to it.
 
Methods inherited from class sbrt.shell.text.AbstractListFormat
format, getDelimiter, getElementFormatter, getElementParser, getRegex, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface sbrt.shell.text.Formatter
format
 

Constructor Detail

TabListFormat

public TabListFormat(SimpleFormat<E> elementFormat)
Constructs a new tab-delimited list format with the provided element format.

Parameters:
elementFormat - the format of the list-elements.

TabListFormat

public TabListFormat(Formatter<E> elementFormatter,
                     Parser<E> elementParser)
Constructs a new tab-delimited list format with the provided element format.

Parameters:
elementFormatter - the formatter for the list-elements.
elementParser - the parser for the list-elements.
Method Detail

getBasic

public static final TabListFormat<java.lang.String> getBasic()
Returns a TabListFormat that does not format or parse the elements supplied to it. In other words, it returns a TabListFormat with the most basic possible functionality. Empty strings are not allowed however.

Returns:
an TabListFormat that does not format or parse the elements supplied to it.