01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: Typed.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.engine.testelements.outputs;
09:
10: import com.uwyn.rife.engine.Element;
11: import com.uwyn.rife.tools.StringUtils;
12:
13: public class Typed extends Element {
14: public void processElement() {
15: if (hasInputValue("input1")) {
16: print(StringUtils.join(getInputValues("input1"), ","));
17: print(StringUtils.join(getInputValues("input2"), ","));
18: print(StringUtils.join(getInputValues("input3"), ","));
19: print(StringUtils.join(getInputValues("input4"), ","));
20: print(StringUtils.join(getInputValues("input5"), ","));
21: print(StringUtils.join(getInputValues("input6"), ","));
22: print(StringUtils.join(getInputValues("input7"), ","));
23: return;
24: }
25:
26: setOutput("outputstring", "astring");
27: setOutput("outputchar", 'U');
28: setOutput("outputchararray", new char[] { 'b', 'k', 'o' });
29: setOutput("outputint", Integer.MAX_VALUE);
30: setOutput("outputlong", Long.MAX_VALUE);
31: setOutput("outputdouble", 34798.43);
32: setOutput("outputfloat", 43.18f);
33:
34: addOutputValue("outputstring", "astring2");
35: addOutputValues("outputstring", new String[] { "astring3",
36: "astring4" });
37: addOutputValue("outputchar", 'V');
38: addOutputValue("outputchararray", new char[] { 'k', 'k', 'l' });
39: addOutputValue("outputint", 78327);
40: addOutputValue("outputlong", 83764987398L);
41: addOutputValue("outputdouble", 893749.56);
42: addOutputValue("outputfloat", 87.34f);
43:
44: exit("exit");
45: }
46: }
|