sbrt.shell.text
Class AmpersandSetFormat<E>
java.lang.Object
sbrt.shell.text.AbstractLinkedHashSetFormat<E>
sbrt.shell.text.AmpersandSetFormat<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 AmpersandSetFormat<E>
- extends AbstractLinkedHashSetFormat<E>
This class is used to define a format for ampersand-delimited sets. If a set is
composed of elements a, b, c, its string representation would be
"a & b & c
".
- Author:
- This class was written and documented by
Jeremiah Wright while in the Wagner lab.
Method Summary |
static AmpersandSetFormat<java.lang.String> |
getBasic()
Returns a AmpersandSetFormat that does not
format or parse the elements supplied to it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AmpersandSetFormat
public AmpersandSetFormat(SimpleFormat<E> elementFormat)
- Constructs a new ampersand-delimited set format with the
provided element format.
- Parameters:
elementFormat
- the format of the set-elements.
AmpersandSetFormat
public AmpersandSetFormat(Formatter<E> elementFormatter,
Parser<E> elementParser)
- Constructs a new ampersand-delimited set format with the
provided element format.
- Parameters:
elementFormatter
- the formatter for the set-elements.elementParser
- the parser for the set-elements.
getBasic
public static final AmpersandSetFormat<java.lang.String> getBasic()
- Returns a
AmpersandSetFormat
that does not
format or parse the elements supplied to it. In other
words, it returns a AmpersandSetFormat
with
the most basic possible functionality. Empty strings are not
allowed however.
- Returns:
- an
AmpersandSetFormat
that does not
format or parse the elements supplied to it.