@Test public void testGetArgs() throws Exception { Variable v = Variable.create(Type.INT, "v", "10"); Variable w = Variable.create(Type.INT, "w", "5"); Application a = new Application(Operator.ADDITION, v, w, v); Variable[] args = {v, w}; assertArrayEquals(args, a.getArgs()); }
public final Variable[] getArgs() { return this.args.length > 0 ? Arrays.copyOf(this.args, this.args.length - 1) : new Variable[0]; }
Application extends Operation { public final Variable[] getArgs() { return this.args.length > 0 ? Arrays.copyOf(this.args, this.args.length - 1) : new Variable[0]; } }
Application extends Operation { public final Variable[] getArgs() { return this.args.length > 0 ? Arrays.copyOf(this.args, this.args.length - 1) : new Variable[0]; } Application(final Operator operator, final Variable ... args); }
Application extends Operation { public final Variable[] getArgs() { return this.args.length > 0 ? Arrays.copyOf(this.args, this.args.length - 1) : new Variable[0]; } Application(final Operator operator, final Variable ... args); final Operator getOperator(); final Variable[] getArgs(); final Variable getTarget(); @Override final String toString(); }
Application extends Operation { public final Variable[] getArgs() { return this.args.length > 0 ? Arrays.copyOf(this.args, this.args.length - 1) : new Variable[0]; } Application(final Operator operator, final Variable ... args); final Operator getOperator(); final Variable[] getArgs(); final Variable getTarget(); @Override final String toString();  }