Package org.gwtoolbox.commons.conversion.client

Examples of org.gwtoolbox.commons.conversion.client.TextConversionException


    public Object toValue(String text) {
        try {
            return Short.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to short", nfe);
        }
    }
View Full Code Here


    public Object toValue(String text) {
        try {
            return Long.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to long", nfe);
        }
    }
View Full Code Here

        return String.valueOf(value);
    }

    public Object toValue(String text) {
        if (text == null || text.length() != 1) {
            throw new TextConversionException("Could not conver '" + text + "' to character");
        }
        return new Character(text.charAt(0));
    }
View Full Code Here

    public Object toValue(String text) {
        try {
            return Float.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to float", nfe);
        }
    }
View Full Code Here

    public Object toValue(String text) {
        try {
            return Integer.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to integer", nfe);
        }
    }
View Full Code Here

    public Object toValue(String text) {
        try {
            return Byte.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to byte", nfe);
        }
    }
View Full Code Here

    public Object toValue(String text) {
        try {
            return Double.valueOf(text);
        } catch (NumberFormatException nfe) {
            throw new TextConversionException("Could not conver '" + text + "' to double", nfe);
        }
    }
View Full Code Here

TOP

Related Classes of org.gwtoolbox.commons.conversion.client.TextConversionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.