com.martiansoftware.jsap.stringparsers
Class StringStringParser

java.lang.Object
  extended bycom.martiansoftware.jsap.StringParser
      extended bycom.martiansoftware.jsap.stringparsers.StringStringParser

public class StringStringParser
extends StringParser

A StringParser for parsing Strings. This is the simplest possible StringParser, simply returning the specified argument in all cases. This class never throws a ParseException under any circumstances.

Author:
Marty Lamb
See Also:
StringParser, String

Constructor Summary
StringStringParser()
          Deprecated. Use getParser() or, even better, JSAP.STRING_PARSER.
 
Method Summary
static StringStringParser getParser()
          Returns a StringStringParser.
 Object parse(String arg)
          Returns the specified argument as a String.
 
Methods inherited from class com.martiansoftware.jsap.StringParser
setUp, tearDown
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringStringParser

public StringStringParser()
Deprecated. Use getParser() or, even better, JSAP.STRING_PARSER.

Creates a new StringStringParser.

Method Detail

getParser

public static StringStringParser getParser()
Returns a StringStringParser.

Convenient access to the only instance returned by this method is available through JSAP.STRING_PARSER.

Returns:
a StringStringParser.

parse

public Object parse(String arg)
Returns the specified argument as a String.

Specified by:
parse in class StringParser
Parameters:
arg - the argument to parse
Returns:
the specified argument as a String.
See Also:
String, StringParser.parse(String)


Copyright © 2002-2006, Martian Software, Inc.. All Rights Reserved.
For the latest version and documentation, please visit http://www.martiansoftware.com/jsap