Esempio n. 1
0
  @Override
  public String toString() {

    try {
      // TODO: make this faster, we generate too many exceptions
      // on account of this piece of code!
      ESeq str = EString.make(this);
      return str.toString();
    } catch (ErlangException e) {
      // ignor e//
    }

    StringBuffer sb = new StringBuffer("[");

    assert (this instanceof EList);

    ESeq val = this;
    while ((val.testNil()) == null) {
      if (val != this) {
        sb.append(",");
      }
      sb.append(val.head());
      val = val.tail();
    }

    sb.append("]");
    return sb.toString();
  }