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