1 package gnu.mapping; 2 3 7 8 public abstract class ProcedureN extends Procedure 9 { 10 public ProcedureN () 11 { 12 super(); 13 } 14 15 public ProcedureN (String n) 16 { 17 super(n); 18 } 19 20 public static final Object [] noArgs = new Object [0]; 21 22 public Object apply0 () throws Throwable 23 { 24 return applyN(noArgs); 25 } 26 27 public Object apply1 (Object arg1) throws Throwable 28 { 29 Object [] args = new Object [1]; 30 args[0] = arg1; 31 return applyN (args); 32 } 33 34 public Object apply2 (Object arg1,Object arg2) throws Throwable 35 { 36 Object [] args = new Object [2]; 37 args[0] = arg1; 38 args[1] = arg2; 39 return applyN (args); 40 } 41 42 public Object apply3 (Object arg1, Object arg2, Object arg3) throws Throwable 43 { 44 Object [] args = new Object [3]; 45 args[0] = arg1; 46 args[1] = arg2; 47 args[2] = arg3; 48 return applyN (args); 49 } 50 51 public Object apply4 (Object arg1, Object arg2, 52 Object arg3, Object arg4) throws Throwable 53 { 54 Object [] args = new Object [4]; 55 args[0] = arg1; 56 args[1] = arg2; 57 args[2] = arg3; 58 args[3] = arg4; 59 return applyN (args); 60 } 61 62 public abstract Object applyN (Object [] args) throws Throwable ; 63 } 64 | Popular Tags |