示例#1
0
 Node buildNode() {
   if (head == null) {
     throw new IllegalStateException("no SEXPs have been added");
   }
   head.unsafeSetAttributes(attributesBuilder.build());
   return head;
 }
示例#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;
 }
示例#3
0
 public Builder setAttribute(String name, SEXP value) {
   attributesBuilder.set(name, value);
   return this;
 }
示例#4
0
 @Override
 public SEXPBuilder removeAttribute(Symbol attributeName) {
   attributesBuilder.remove(attributeName);
   return this;
 }