|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.text.Format net.sf.fikin.pojostate.format.FixedStringFormat
public class FixedStringFormat
Prints a fixed string instead of actually formatting the input object.
This is useful when you want to print an error but you can't throw an exception. created on Jul 6, 2005
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.Format |
---|
java.text.Format.Field |
Constructor Summary | |
---|---|
FixedStringFormat(java.lang.String message)
instantiate this formatter with given message. |
|
FixedStringFormat(java.lang.String message,
java.lang.Throwable err)
instantiate this formatter with given message. |
Method Summary | |
---|---|
java.lang.StringBuffer |
format(java.lang.Object obj,
java.lang.StringBuffer toAppendTo,
java.text.FieldPosition pos)
It does not format but rather prints out the given at construction time message. |
java.lang.Object |
parseObject(java.lang.String source,
java.text.ParsePosition pos)
not supported |
Methods inherited from class java.text.Format |
---|
clone, format, formatToCharacterIterator, parseObject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedStringFormat(java.lang.String message)
message
- to be printedpublic FixedStringFormat(java.lang.String message, java.lang.Throwable err)
message
- to be printederr
- to be printedMethod Detail |
---|
public java.lang.Object parseObject(java.lang.String source, java.text.ParsePosition pos)
parseObject
in class java.text.Format
source
- pos
-
public java.lang.StringBuffer format(java.lang.Object obj, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
format
in class java.text.Format
obj
- has to be java.lang.BooleantoAppendTo
- to append the string representation of objpos
- is irrelevant in this method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |