View Javadoc

1   /*
2    *  Copyright 1999-2004 The Apache Software Foundation.
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *  http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  package org.apache.struts.flow.core;
17  
18  /***  Stores an argument to be passed into the method called for flow execution */
19  public class Argument {
20      private String name;
21      private Object value;
22  
23  
24      /***
25       *  Constructor for the Argument object
26       *
27       *@param  name   The argument name
28       *@param  value  The argument value
29       */
30      public Argument(String name, Object value) {
31          this.name = name;
32          this.value = value;
33      }
34  
35  
36      /***
37       *  Returns the value of name.
38       *
39       *@return    The name value
40       */
41      public String getName() {
42          return name;
43      }
44  
45  
46      /***
47       *  Returns the value of value.
48       *
49       *@return    The value value
50       */
51      public Object getValue() {
52          return value;
53      }
54  
55  
56      /***
57       *  Prints the string value of the state
58       *
59       *@return    The string state
60       */
61      public String toString() {
62          return name + ": " + value;
63      }
64  
65  }