View Javadoc
1   package org.csveed.bean.conversion;
2   
3   import java.util.Currency;
4   
5   public class CurrencyConverter extends AbstractConverter<Currency> {
6   
7       public CurrencyConverter() {
8           super(Currency.class);
9       }
10  
11      @Override
12      public Currency fromString(String text) {
13          return Currency.getInstance(text);
14      }
15  
16      @Override
17      public String toString(Currency value) {
18          return value != null ? value.getCurrencyCode() : "";
19      }
20  
21  }