KickJava   Java API By Example, From Geeks To Geeks.

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


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