sbrt.shell.text
Class TabSetFormat<E>

java.lang.Object
  extended by sbrt.shell.text.AbstractLinkedHashSetFormat<E>
      extended by sbrt.shell.text.TabSetFormat<E>
Type Parameters:
E - the element type.
All Implemented Interfaces:
Formatter<java.util.Set<? extends E>>, LinkedHashSetFormat<E>, Parser<java.util.LinkedHashSet<E>>

public final class TabSetFormat<E>
extends AbstractLinkedHashSetFormat<E>

This class is used to define a format for tab-delimited sets. If a set 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
TabSetFormat(Formatter<E> elementFormatter, Parser<E> elementParser)
          Constructs a new tab-delimited set format with the provided element format.
TabSetFormat(SimpleFormat<E> elementFormat)
          Constructs a new tab-delimited set format with the provided element format.
 
Method Summary
static TabSetFormat<java.lang.String> getBasic()
          Returns a TabSetFormat that does not format or parse the elements supplied to it.
 
Methods inherited from class sbrt.shell.text.AbstractLinkedHashSetFormat
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

TabSetFormat

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

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

TabSetFormat

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

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

getBasic

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

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