/** * Constructs a new Decls with the specified head and tail. * * @requires head.size > 0 && tail.size > 0 * @ensures this.size' = head.size + tail.size && (all i: [0..head.size) | this.decls[i] = * head.decls[i]) && (all i: [head.size..this.size') | this.decls[i] = tail.decls[i]) * @throws NullPointerException head = null || tail is null */ private Decls(Decls head, Decls tail) { this.decls = new Decl[head.size() + tail.size()]; System.arraycopy(head.decls, 0, decls, 0, head.size()); System.arraycopy(tail.decls, 0, decls, head.size(), tail.size()); }
/** * Returns the arity of this comprehension expression, which is the sum of the arities of declared * variables * * @return #this.decls */ public int arity() { return decls.size(); }