/** {@inheritDoc} */ @Override public IASTMutable copy() { return new AST1(arg0, arg1); }
public IAST removeFromEnd(int fromPosition) { if (fromPosition == 1) { return new AST0(arg0); } if (fromPosition == 2) { return this; } throw new IndexOutOfBoundsException("Index: " + Integer.valueOf(fromPosition) + ", Size: " + size()); }
/** * Create a function with 1 argument as a <code>AST1</code> immutable object without evaluation. * * @param head * @param a0 * @return */ public final static IASTMutable unaryAST1(final IExpr head, final IExpr a0) { return new AST1(head, a0); }
public IAST removeFromEnd(int fromPosition) { if (fromPosition == 1) { return new AST0(arg0); } if (fromPosition == 2) { return new AST1(arg0, arg1); } if (fromPosition == 3) { return this; } throw new IndexOutOfBoundsException("Index: " + Integer.valueOf(fromPosition) + ", Size: " + size()); }
public IAST removeFromEnd(int fromPosition) { if (fromPosition == 1) { return new AST0(arg0); } if (fromPosition == 2) { return new AST1(arg0, arg1); } if (fromPosition == 3) { return new AST2(arg0, arg1, arg2); } if (fromPosition == 4) { return this; } throw new IndexOutOfBoundsException("Index: " + Integer.valueOf(fromPosition) + ", Size: " + size()); }