sbrt.shell.text
Class StringFormat

java.lang.Object
  extended by sbrt.shell.text.StringFormat
All Implemented Interfaces:
Format, Formatter<java.lang.String>, Parser<java.lang.String>, SimpleFormat<java.lang.String>

public final class StringFormat
extends java.lang.Object
implements SimpleFormat<java.lang.String>

This class is used to define a format for String objects. Since String objects are already formatted as strings, no formatting or parsing is actually required. This class can be thought of as the trivial format.

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

Constructor Summary
StringFormat()
           
 
Method Summary
 java.lang.String format(java.lang.String obj)
          Returns the provided string.
 java.lang.String parse(java.lang.String s)
          Returns a string equal to the one provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringFormat

public StringFormat()
Method Detail

format

public java.lang.String format(java.lang.String obj)
Returns the provided string.

Specified by:
format in interface Formatter<java.lang.String>
Parameters:
obj - the string that is returned.
Returns:
the provided string.

parse

public java.lang.String parse(java.lang.String s)
Returns a string equal to the one provided.

Specified by:
parse in interface Parser<java.lang.String>
Parameters:
s - the string that is returned.
Returns:
a string equal to the one provided.