~ubuntu-branches/ubuntu/oneiric/libcommons-validator-java/oneiric

« back to all changes in this revision

Viewing changes to src/share/org/apache/commons/validator/Msg.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2005-02-28 12:26:04 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050228122604-r83gh4nep0a4c9wv
Tags: 1:1.1.4-2
generate the javadoc

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java,v 1.12 2004/02/21 17:10:29 rleland Exp $
3
 
 * $Revision: 1.12 $
4
 
 * $Date: 2004/02/21 17:10:29 $
 
2
 * $Header: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Msg.java,v 1.12.2.2 2004/11/11 15:32:03 niallp Exp $
 
3
 * $Revision: 1.12.2.2 $
 
4
 * $Date: 2004/11/11 15:32:03 $
5
5
 *
6
6
 * ====================================================================
7
7
 * Copyright 2001-2004 The Apache Software Foundation
49
49
    protected String name = null;
50
50
 
51
51
    /**
 
52
     * Whether or not the key is a message resource (optional).  Defaults to
 
53
     * true.  If it is 'true', the value will try to be resolved as a message
 
54
     * resource.
 
55
     * @since Validator 1.1.4
 
56
     */
 
57
    protected boolean resource = true;
 
58
 
 
59
    /**
52
60
     * Returns the resource bundle name.
53
61
     * @since Validator 1.1
54
62
     */
94
102
    }
95
103
 
96
104
    /**
 
105
     * Tests whether or not the key is a resource key or literal value.
 
106
     * @return <code>true</code> if key is a resource key.
 
107
     * @since Validator 1.1.4
 
108
     */
 
109
    public boolean isResource() {
 
110
        return this.resource;
 
111
    }
 
112
 
 
113
    /**
 
114
     * Sets whether or not the key is a resource.
 
115
     * @param resource If true indicates the key is a resource.
 
116
     * @since Validator 1.1.4
 
117
     */
 
118
    public void setResource(boolean resource) {
 
119
        this.resource = resource;
 
120
    }
 
121
 
 
122
    /**
97
123
     * Creates and returns a copy of this object.
98
124
     */
99
125
    public Object clone() {
115
141
        results.append(name);
116
142
        results.append("  key=");
117
143
        results.append(key);
 
144
        results.append("  resource=");
 
145
        results.append(resource);
 
146
        results.append("  bundle=");
 
147
        results.append(bundle);
118
148
        results.append("\n");
119
149
 
120
150
        return results.toString();