Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangException


    public int getInt(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangLong) {
            return ((OtpErlangLong) r).intValue();
        }
        throw new OtpErlangException("value is not an integer");
    }
View Full Code Here


    public long getLong(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangLong) {
            return ((OtpErlangLong) r).longValue();
        }
        throw new OtpErlangException("value is not an integer");
    }
View Full Code Here

    public String getAtom(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangAtom) {
            return ((OtpErlangAtom) r).atomValue();
        }
        throw new OtpErlangException("value is not an atom");
    }
View Full Code Here

    public String getQuotedAtom(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangAtom) {
            return ((OtpErlangAtom) r).toString();
        }
        throw new OtpErlangException("value is not an atom");
    }
View Full Code Here

    public String getString(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangString) {
            return ((OtpErlangString) r).stringValue();
        }
        throw new OtpErlangException("value is not a string");
    }
View Full Code Here

            throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangList) {
            return Lists.newArrayList(((OtpErlangList) r).elements());
        }
        throw new OtpErlangException("value is not a list");
    }
View Full Code Here

    public OtpErlangObject[] getTuple(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangTuple) {
            return ((OtpErlangTuple) r).elements();
        }
        throw new OtpErlangException("value is not a tuple");
    }
View Full Code Here

    public OtpErlangPid getPid(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangPid) {
            return (OtpErlangPid) r;
        }
        throw new OtpErlangException("value is not a pid");
    }
View Full Code Here

    public OtpErlangBinary getBinary(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangBinary) {
            return (OtpErlangBinary) r;
        }
        throw new OtpErlangException("value is not a binary");
    }
View Full Code Here

    public double getDouble(final String name) throws OtpErlangException {
        final OtpErlangObject r = get(name);
        if (r instanceof OtpErlangDouble) {
            return ((OtpErlangDouble) r).doubleValue();
        }
        throw new OtpErlangException("value is not a double");
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangException

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.