1 package org.paneris.jammyjoes.mvp;
2
3
4 public class EmptyStringConverter implements Converter {
5
6 Converter _converter;
7 public EmptyStringConverter(Converter converter) {
8 _converter = converter;
9 }
10
11 public Object convert(String string) {
12 return new NullConverter(new Converter() {
13 public Object convert(String string) {
14 if ("".equals(string)) {
15 return null;
16 }
17 return _converter.convert(string);
18 }}).convert(string);
19 }
20
21 }