Example #1
0
 Node buildNode() {
   if (head == null) {
     throw new IllegalStateException("no SEXPs have been added");
   }
   head.unsafeSetAttributes(attributesBuilder.build());
   return head;
 }
Example #2
0
 public Builder add(SEXP tag, SEXP s) {
   if (head == null) {
     head = new Node(tag, s, attributesBuilder.build(), Null.INSTANCE);
     tail = head;
   } else {
     Node next = new Node(tag, s, Null.INSTANCE);
     tail.nextNode = next;
     tail = next;
   }
   return this;
 }