|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| CharConverter.java | 0% | 0% | 0% | 0% |
|
||||||||||||||
| 1 | /* | |
| 2 | * CharPropertyEditor.java | |
| 3 | * | |
| 4 | * Created on 28. September 2004, 13:10 | |
| 5 | */ | |
| 6 | ||
| 7 | package org.jconfig.utils.editors; | |
| 8 | ||
| 9 | /** | |
| 10 | * The CharConverter will convert the given text into a Character object. | |
| 11 | * It simply takes the first char of the text and returns this as Character. | |
| 12 | * | |
| 13 | * @author Andreas Mecky andreasmecky@yahoo.de | |
| 14 | * @author Terry Dye terrydye@yahoo.com | |
| 15 | */ | |
| 16 | public class CharConverter implements TypeConverter { | |
| 17 | ||
| 18 | /** | |
| 19 | * | |
| 20 | */ | |
| 21 | 0 | public CharConverter() { |
| 22 | } | |
| 23 | ||
| 24 | 0 | public Object getObject(String value) { |
| 25 | 0 | if ( value != null ) { |
| 26 | 0 | return new Character(value.charAt(0)); |
| 27 | } | |
| 28 | else { | |
| 29 | 0 | return null; |
| 30 | } | |
| 31 | } | |
| 32 | ||
| 33 | } |
|
||||||||||