olg.csv.bean.parser.impl
Class DecorateParser<T>
java.lang.Object
olg.csv.bean.parser.AbstractParser<T>
olg.csv.bean.parser.impl.DecorateParser<T>
- Type Parameters:
T
-
public final class DecorateParser<T>
- extends AbstractParser<T>
Parser Decorator use for substitute null and empty string value by a default
string to be parsed.
Method Summary |
T |
parse(String str)
Converts a string into a new instance of . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
private final AbstractParser<T> parser
- the decorated parser.
defaut
private final String defaut
- the default value.
DecorateParser
public DecorateParser(AbstractParser<T> parser,
String defaut)
- constructs a decorateParser.
- Parameters:
parser
- the parser.defaut
- the default value to parse.
parse
public T parse(String str)
- Description copied from class:
AbstractParser
- Converts a string into a new instance of .
- Specified by:
parse
in class AbstractParser<T>
- Parameters:
str
- the string.
- Returns:
- the new instance of .
Copyright © 2014. All Rights Reserved.