01: /*
02: * xtc - The eXTensible Compiler
03: * Copyright (C) 2005-2007 New York University
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License
07: * version 2 as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU General Public License for more details.
13: *
14: * You should have received a copy of the GNU General Public License
15: * along with this program; if not, write to the Free Software
16: * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17: * USA.
18: */
19: package xtc.xform;
20:
21: import java.util.List;
22:
23: /**
24: * TestFunction external method class.
25: *
26: * @version $Revision: 1.8 $
27: */
28: class TestFunction implements Function {
29:
30: /**
31: * Get the name of the function.
32: * @return The function name
33: */
34: public String getName() {
35: return "testFunction";
36: }
37:
38: /**
39: * Just return the first sequence in args.
40: * @param args The List of sequences
41: * @return The first sequence in args
42: */
43: public Object apply(List<Object> args) {
44: return args.get(0);
45: }
46: }
|