/** * Returns a new {@code HMArrayList} with the same elements, the same size and the same capacity as this * {@code HMArrayList}. * * @return a shallow copy of this {@code ArrayList} * @see java.lang.Cloneable */ @Override public IAST clone() { return new AST3(arg0, arg1, arg2, arg3); }
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()); }
/** * Create a function with 3 arguments as a <code>AST3</code> immutable object without evaluation. * * @param head * @param a0 * @param a1 * @param a2 * @return */ public final static IASTMutable ternaryAST3(final IExpr head, final IExpr a0, final IExpr a1, final IExpr a2) { return new AST3(head, a0, a1, a2); }
/** {@inheritDoc} */ @Override public IASTMutable copy() { return new AST3(arg0, arg1, arg2, arg3); }