Package erjang

Examples of erjang.ECons


    return cell.head();
  }

  @BIF
  static public EObject hd(EObject cell) {
    ECons cons;
    if ((cons = cell.testNonEmptyList()) != null) {
      return cons.head();
    }
    throw ERT.badarg(cell);
  }
View Full Code Here


    throw ERT.badarg(cell);
  }

  @BIF
  static public EObject tl(EObject cell) {
    ECons cons;
    if ((cons = cell.testNonEmptyList()) != null) {
      return cons.tail();
    }
    throw ERT.badarg(cell);
  }
View Full Code Here

    throw ERT.badarg(cell);
  }

  @BIF(type = Type.GUARD, name = "hd")
  static public EObject hd$p(EObject cell) {
    ECons cons;
    if ((cons = cell.testNonEmptyList()) != null) {
      return cons.head();
    }
    return null;
  }
View Full Code Here

    return null;
  }

  @BIF(type = Type.GUARD, name = "tl")
  static public EObject tl$p(EObject cell) {
    ECons cons;
    if ((cons = cell.testNonEmptyList()) != null) {
      return cons.tail();
    }
    return null;
  }
View Full Code Here

      this.command = command;

      // argument can be any list, ... turn it into a string
      ESeq es = name.elem2.testString();
      if (es == null) {
        ECons cons;
        EAtom am;
        if ((cons = name.elem2.testCons()) != null) {
          es = EString.make(cons);
        } else if ((am = name.elem2.testAtom()) != null) {
          es = EString.fromString(am.getName());
View Full Code Here

    this.is_in_only = false;
    this.is_out_only = false;
    this.send_binary_data = false;

    ECons settings = portSetting.testCons();
    if (settings == null)
      throw ERT.badarg();

    for (; settings != null && !settings.isNil(); settings = settings
        .tail().testCons()) {

      EObject val = settings.head();
      ETuple tup;
      if ((tup = val.testTuple()) != null) {
        ETuple2 tup2;
        if ((tup2 = ETuple2.cast(tup)) != null) {
View Full Code Here

TOP

Related Classes of erjang.ECons

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.