Package mondrian.olap

Examples of mondrian.olap.InvalidArgumentException


    @Description("Returns a specified number of characters from a string.")
    public static String mid(String value, int beginIndex, int length) {
        // Arguments are 1-based. Spec says that the function gives an error if
        // Start <= 0 or Length < 0.
        if (beginIndex <= 0) {
            throw new InvalidArgumentException(
                "Invalid parameter. "
                + "Start parameter of Mid function must be positive");
        }
        if (length < 0) {
            throw new InvalidArgumentException(
                "Invalid parameter. "
                + "Length parameter of Mid function must be non-negative");
        }

        if (beginIndex > value.length()) {
View Full Code Here


        Object first,
        Object second)
    {
        double iFirst;
        if (!(first instanceof Number)) {
            throw new InvalidArgumentException(
                "Invalid parameter. "
                + "first parameter " + first
                + " of Mod function must be of type number");
        } else {
            iFirst = ((Number) first).doubleValue();
        }
        double iSecond;
        if (!(second instanceof Number)) {
            throw new InvalidArgumentException(
                "Invalid parameter. "
                + "second parameter " + second
                + " of Mod function must be of type number");
        } else {
            iSecond = ((Number) second).doubleValue();
View Full Code Here

TOP

Related Classes of mondrian.olap.InvalidArgumentException

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.