Package ceylon.language

Examples of ceylon.language.OverflowException


    public static int toInt(long value) {
        if (value <= java.lang.Integer.MAX_VALUE
                && value >= java.lang.Integer.MIN_VALUE) {
            return (int)value;
        }
        throw new OverflowException();
    }
View Full Code Here


    public static short toShort(long value) {
        if (value <= java.lang.Short.MAX_VALUE
                && value >= java.lang.Short.MIN_VALUE) {
            return (short)value;
        }
        throw new OverflowException();
    }
View Full Code Here

    public static byte toByte(long value) {
        if (value <= java.lang.Byte.MAX_VALUE
                && value >= java.lang.Byte.MIN_VALUE) {
            return (byte)value;
        }
        throw new OverflowException();
    }
View Full Code Here

TOP

Related Classes of ceylon.language.OverflowException

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.