Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangBoolean


      try {
    dbg("Got remoteStatus: " + node + " " + up + " "  + info);
    OtpErlangObject[] msgArray = new OtpErlangObject[4];
    msgArray[0] = new OtpErlangAtom("remoteStatus");
    msgArray[1] = new OtpErlangString(node);
    msgArray[2] = new OtpErlangBoolean(up);
    msgArray[3] = mbox.self();
    OtpErlangTuple msg = new OtpErlangTuple(msgArray);
    mbox.send("erl_status_server", erlNode, msg);

      }
View Full Code Here


      try {
    dbg("Got localStatus: " + node + " " + up + " "  + info);
    OtpErlangObject[] msgArray = new OtpErlangObject[4];
    msgArray[0] = new OtpErlangAtom("localStatus");
    msgArray[1] = new OtpErlangString(node);
    msgArray[2] = new OtpErlangBoolean(up);
    msgArray[3] = mbox.self();
    OtpErlangTuple msg = new OtpErlangTuple(msgArray);
    mbox.send("erl_status_server", erlNode, msg);

      }
View Full Code Here

      try {
    dbg("Got connAttempt: " + node + " " + incoming + " "  + info);
    OtpErlangObject[] msgArray = new OtpErlangObject[4];
    msgArray[0] = new OtpErlangAtom("connAttempt");
    msgArray[1] = new OtpErlangString(node);
    msgArray[2] = new OtpErlangBoolean(incoming);
    msgArray[3] = mbox.self();
    OtpErlangTuple msg = new OtpErlangTuple(msgArray);
    mbox.send("erl_status_server", erlNode, msg);

      }
View Full Code Here

        }
        return new OtpErlangList(l);
    }
      } else if (atomValue.equals("hash_lookup")) {
    final boolean exists = hash_set.contains(i);
    final OtpErlangBoolean b = new OtpErlangBoolean(exists);
    return b;
      } else if (atomValue.equals("hash_clear")) {
    hash_set.clear();
    return new OtpErlangAtom("hash_cleared");
      }
View Full Code Here

     *             not supported
     */
    public static <T> OtpErlangObject convertToErlang(final T value)
            throws ClassCastException {
        if (value instanceof Boolean) {
            return new OtpErlangBoolean((Boolean) value);
        } else if (value instanceof Integer) {
            return new OtpErlangLong((Integer) value);
        } else if (value instanceof Long) {
            return new OtpErlangLong((Long) value);
        } else if (value instanceof BigInteger) {
View Full Code Here

     * Test method for {@link de.zib.scalaris.ErlangValue#boolValue()}.
     */
    @Test
    public final void testBoolValue() {
        ErlangValue trueVal = new ErlangValue(true);
        ErlangValue trueValOtp = new ErlangValue(new OtpErlangBoolean(true));
        ErlangValue falseVal = new ErlangValue(false);
        ErlangValue falseValOtp = new ErlangValue(new OtpErlangBoolean(false));

        assertEquals(true, trueVal.boolValue());
        assertEquals(true, trueValOtp.boolValue());
        assertEquals(false, falseVal.boolValue());
        assertEquals(false, falseValOtp.boolValue());
View Full Code Here

        for (Iterator<Object> iterator = value.iterator(); iterator.hasNext();) {
            Object value_i = iterator.next();
            OtpErlangObject valueOtp_i;

            if (value_i instanceof Boolean) {
                valueOtp_i = new OtpErlangBoolean((Boolean) value_i);
            } else if (value_i instanceof Integer) {
                valueOtp_i = new OtpErlangInt((Integer) value_i);
            } else if (value_i instanceof Long) {
                valueOtp_i = new OtpErlangLong((Long) value_i);
            } else if (value_i instanceof BigInteger) {
View Full Code Here

  protected OtpErlangObject convertBasicTypeToErlang(Object obj) {
    if (obj instanceof byte[]) {
      return new OtpErlangBinary((byte[]) obj);
    } else if (obj instanceof Boolean) {
      return new OtpErlangBoolean((Boolean) obj);
    } else if (obj instanceof Byte) {
      return new OtpErlangByte((Byte) obj);
    } else if (obj instanceof Character) {
      return new OtpErlangChar((Character) obj);
    } else if (obj instanceof Double) {
View Full Code Here

TOP

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

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.