Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/aendvari/tethys/tag/logic/Response.java


1   /*
2    * Response.java
3    *
4    * Copyright (c) 2001, 2002 Aendvari, Ltd. All Rights Reserved.
5    *
6    * See the file LICENSE for terms of use.
7    *
8    */
9   
10  package com.aendvari.tethys.tag.logic;
11  
12  
13  import com.aendvari.common.model.*;
14  
15  import com.aendvari.tethys.context.*;
16  
17  
18  /**
19   * <p>This class is used to hold operator/match information.</p>
20   *
21   * @author  Scott Milne
22   *
23   */
24  
25  public class Response extends Context
26  {
27    /* Variables */
28  
29    /** the value of the operator/match */
30    private String value;
31  
32    /** determines if the value matched */
33    private boolean matched;
34  
35  
36    /* Constructors */
37  
38    /**
39     * Constructs a <code>Response</code> from the supplied values.
40     *
41     * @param    location    The location of the response. This includes the response name.
42     * @param    value      The content of the inset.
43     * @param    matched      The content of the inset.
44     *
45     */
46  
47    public Response(String location, String value, boolean matched)
48    {
49      super(location);
50  
51      this.value = value;
52      this.matched = matched;
53    }
54  
55  
56    /* Attributes */
57  
58    public void setValue( String value ) { this.value = value; }
59    public String getValue() { return value; }
60  
61    public void setMatched( boolean matched ) { this.matched = matched; }
62    public boolean getMatched() { return matched; }
63  
64  
65    public String toString()
66    {
67      String toString = "Response=[";
68  
69      toString += "location=" + getLocation() + ",";
70      toString += "value=" + getValue() + ",";
71      toString += "matched=" + getMatched() + ",";
72      toString += "]";
73  
74      return toString;
75    }
76  }
77