Package erjang

Examples of erjang.ETuple2


    /*
     * send message:* {inet_async, Port, Ref, {error,Reason}}
     */

    ETuple msg = ETuple.make(am_inet_async, port(), ERT.box(id),
        new ETuple2(ERT.am_error, reason));
    if (portlog.isLoggable(Level.FINER)) {
      portlog.finer("sending to " + caller + " ! " + msg);
    }
    caller.send(port(), msg);
    return  true;
View Full Code Here


    return true;
  }

  private boolean send_async_ok_port(int id, EPID caller, EPort port2) throws Pausable {
    ETuple msg = ETuple.make(am_inet_async, port(), ERT.box(id),
        new ETuple2(ERT.am_ok, port2));
    if (portlog.isLoggable(Level.FINER)) {
      log.finer("sending to " + caller + " ! " + msg);
    }
    caller.send(port(), msg);
    return true;
View Full Code Here

     
      ETuple tup;
      if ((tup = elm.testTuple()) != null) {
        if (tup.arity() >= index) {
          if (tup.elm(index).equals(k)) {
            return new ETuple2(ERT.am_value, tup);
          }
        }
      }
     
      src = src.tail();
View Full Code Here

      proc.tail = fun;     
      do {
        pair0 = proc.tail.go(proc);
      } while (pair0 == EProc.TAIL_MARKER);
     
      ETuple2 out = ETuple2.cast(pair0);
     
      if (out == null) {
        throw new ErlangError(am_badmatch, pair0);
      }
     
      map.add(out.elem1);
      acc = out.elem2;
     
      list = list.tail();
    }
   
    ESeq res = ERT.NIL;
    for (int i = map.size()-1; i >= 0; i--) {
      res = res.cons(map.get(i));
    }
   
    return new ETuple2(res, acc);
  }
View Full Code Here

    if ((t = portName.testTuple()) == null)
      throw ERT.badarg(portName, portSetting);

    ETask<? extends EPort> task = null;

    ETuple2 name;
    ETuple3 name3;
    if ((name = ETuple2.cast(t)) != null) {

      EAtom am = name.elem2.testAtom();
      EString command = (am == null)
View Full Code Here

TOP

Related Classes of erjang.ETuple2

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.