KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > workflow > format > DefaultFormat


1 package org.exoplatform.services.workflow.format;
2
3 import java.text.FieldPosition JavaDoc;
4 import java.text.Format JavaDoc;
5 import java.text.ParsePosition JavaDoc;
6
7 public class DefaultFormat extends Format JavaDoc {
8
9     public Object JavaDoc parseObject(String JavaDoc source, ParsePosition JavaDoc pos) {
10     pos.setErrorIndex(-1);
11     if ( source != null ) {
12       pos.setIndex(source.length());
13     }
14         return source;
15     }
16
17     public StringBuffer JavaDoc format(Object JavaDoc obj, StringBuffer JavaDoc toAppendTo, FieldPosition JavaDoc pos) {
18     if ( obj != null ) {
19       toAppendTo.append(obj);
20     }
21         return toAppendTo;
22     }
23
24 }
25
Popular Tags