1 package gnu.mapping; 2 3 8 9 public abstract class Procedure2 extends Procedure 10 { 11 12 public Procedure2(java.lang.String n) 13 { 14 super(n); 15 } 16 public Procedure2() 17 { 18 super(); 19 } 20 21 public int numArgs() { return 0x2002; } 22 23 public Object apply0 () throws Throwable 24 { 25 throw new WrongArguments(this.getName(), 2, "(?)"); 26 } 27 28 public Object apply1 (Object arg1) throws Throwable 29 { 30 throw new WrongArguments(this, 1); 31 } 32 33 public abstract Object apply2 (Object arg1,Object arg2) throws Throwable ; 34 35 public Object apply3 (Object arg1, Object arg2, Object arg3) 36 { 37 throw new WrongArguments(this, 3); 38 } 39 40 public Object apply4 (Object arg1, Object arg2, Object arg3, Object arg4) 41 throws Throwable 42 { 43 throw new WrongArguments(this, 4); 44 } 45 46 public Object applyN (Object [] args) throws Throwable 47 { 48 if (args.length != 2) 49 throw new WrongArguments(this, args.length); 50 return apply2 (args[0], args[1]); 51 } 52 } 53 | Popular Tags |