org.jcoderz.commons.logging
Class AsItIsFormat
java.lang.Object
java.text.Format
org.jcoderz.commons.logging.AsItIsFormat
- All Implemented Interfaces:
- Serializable, Cloneable
public final class AsItIsFormat
- extends Format
This Format class is used for formatting a String as it is, i.e. do no
formatting of the String. For enabling this as a parser for the format,
delimiters can be set when constructing an instance of this. But if this
functionality is actually desired, one has to be sure the delimiter is not
part of the string to format otherwise the result might not be as expected.
- See Also:
- Serialized Form
|
Constructor Summary |
AsItIsFormat(String delimiters)
Constructor, saves the delimiters for parsing. |
AsItIsFormat
public AsItIsFormat(String delimiters)
- Constructor, saves the delimiters for parsing. When this is used for
parsing a String, the delimiters work as for a StringTokenizer.
- Parameters:
delimiters - String containing delimiting chars, used when parsing.
parseObject
public Object parseObject(String source,
ParsePosition pos)
-
- Specified by:
parseObject in class Format
format
public StringBuffer format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
-
- Specified by:
format in class Format
Copyright 2007 The jCoderZ Project.