KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > context > exe > converter > CharacterToStringConverter


1 package org.jbpm.context.exe.converter;
2
3 import org.jbpm.context.exe.*;
4
5 public class CharacterToStringConverter implements Converter {
6
7   private static final long serialVersionUID = 1L;
8
9   public boolean supports(Class JavaDoc clazz) {
10     return (clazz==Character JavaDoc.class);
11   }
12
13   public Object JavaDoc convert(Object JavaDoc o) {
14     return o.toString();
15   }
16
17   public Object JavaDoc revert(Object JavaDoc o) {
18     return new Character JavaDoc(((String JavaDoc)o).charAt(0));
19   }
20 }
21
Popular Tags