Subversion Repository Public Repository

WOX2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package wox.serial;

/**
 * Version: 1.0
 * Author: Carlos R. Jaimez Gonzalez
 * Author: Simon M. Lucas
 * Site: http://woxserializer.sourceforge.net/
 *
 * Version: 1.5
 * Author: Steven M Lewis
 *
 * Version: 2.0
 * Author: George Smith
 * SVN: http://svn.xp-dev.com/svn/WOX2/
 * Note: XML form for vs 2 is more compact and therefor incompatible with vs 1
 */

public class WOXcharHandler extends AbstractWrappableStringableHandler
{
    public static final WOXcharHandler INSTANCE = new WOXcharHandler();

    protected WOXcharHandler()
    {
        super( char.class, "char", Character.class );
    }

    @Override
    protected Object nonNullValueParse( String pValue )
    {
        return pValue.length() == 0 ? (char) 0 : pValue.charAt( 0 );
    }

    @Override
    protected String nonNullValueToString( Object pObject )
    {
        return ((Character) pObject).toString();
    }
}

Commits for WOX2/trunk/Java/src/wox/serial/WOXcharHandler.java

Diff revisions: vs.
Revision Author Commited Message
15 Diff Diff GeorgeS picture GeorgeS Fri 19 Feb, 2010 22:29:49 +0000
3 GeorgeS picture GeorgeS Thu 04 Feb, 2010 23:53:47 +0000