You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by dg...@apache.org on 2003/08/03 19:13:55 UTC

cvs commit: jakarta-commons/validator/src/share/org/apache/commons/validator Arg.java

dgraham     2003/08/03 10:13:55

  Modified:    validator/src/share/org/apache/commons/validator Arg.java
  Log:
  Formatting changes only.
  
  Revision  Changes    Path
  1.10      +54 -53    jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java
  
  Index: Arg.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/validator/src/share/org/apache/commons/validator/Arg.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Arg.java	25 May 2003 18:00:23 -0000	1.9
  +++ Arg.java	3 Aug 2003 17:13:55 -0000	1.10
  @@ -85,41 +85,39 @@
   public class Arg implements Cloneable, Serializable {
   
       /**
  -     * The name dependency that this argument goes with (optional).
  -     */
  -    protected String name = null;
  -
  -    /**
        * The key or value of the argument.
        */
       protected String key = null;
   
       /**
  -     * Whether or not the key is a message resource (optional).  Defaults to true.
  -     * If it is 'true', the value will try to be resolved as a message resource.
  +     * The name dependency that this argument goes with (optional).
        */
  -    protected boolean resource = true;
  +    protected String name = null;
       
       /**
  -     * This argument's position in the message (ie. you would set postion=0 to make 
  -     * a replacement in this string "some msg {0}").
  +     * This argument's position in the message (ie. you would set postion=0 to 
  +     * make a replacement in this string "some msg {0}").
        */
       protected int position = 0;
   
       /**
  -     * Gets the name of the dependency.
  -     * @return the name of the dependency.
  +     * Whether or not the key is a message resource (optional).  Defaults to 
  +     * true.  If it is 'true', the value will try to be resolved as a message 
  +     * resource.
        */
  -    public String getName() {
  -        return this.name;
  -    }
  +    protected boolean resource = true;
   
       /**
  -     * Sets the name of the dependency.
  -     * @param name the name of the dependency.
  +     * Creates and returns a copy of this object.
  +     * @return A copy of this object.
        */
  -    public void setName(String name) {
  -        this.name = name;
  +    public Object clone() {
  +        try {
  +            return super.clone();
  +
  +        } catch (CloneNotSupportedException e) {
  +            throw new InternalError(e.toString());
  +        }
       }
   
       /**
  @@ -131,11 +129,18 @@
       }
   
       /**
  -     * Sets the key/value.
  -     * @param key They to access the argument.
  +     * Gets the name of the dependency.
  +     * @return the name of the dependency.
        */
  -    public void setKey(String key) {
  -        this.key = key;
  +    public String getName() {
  +        return this.name;
  +    }
  +
  +    /**
  +     * @return This argument's replacement position.
  +     */
  +    public int getPosition() {
  +        return this.position;
       }
   
       /**
  @@ -156,24 +161,34 @@
       }
   
       /**
  -     * Sets whether or not the key is a resource.
  -     * @param resource If true indicates the key is a resource.
  +     * Sets the key/value.
  +     * @param key They to access the argument.
        */
  -    public void setResource(boolean resource) {
  -        this.resource = resource;
  +    public void setKey(String key) {
  +        this.key = key;
       }
   
       /**
  -     * Creates and returns a copy of this object.
  -     * @return A copy of this object.
  +     * Sets the name of the dependency.
  +     * @param name the name of the dependency.
        */
  -    public Object clone() {
  -        try {
  -            return super.clone();
  +    public void setName(String name) {
  +        this.name = name;
  +    }
   
  -        } catch (CloneNotSupportedException e) {
  -            throw new InternalError(e.toString());
  -        }
  +    /**
  +     * Set this argument's replacement position.
  +     */
  +    public void setPosition(int position) {
  +        this.position = position;
  +    }
  +
  +    /**
  +     * Sets whether or not the key is a resource.
  +     * @param resource If true indicates the key is a resource.
  +     */
  +    public void setResource(boolean resource) {
  +        this.resource = resource;
       }
   
       /**
  @@ -192,20 +207,6 @@
           results.append("\n");
   
           return results.toString();
  -    }
  -
  -    /**
  -     * @return This argument's replacement position.
  -     */
  -    public int getPosition() {
  -        return this.position;
  -    }
  -
  -    /**
  -     * Set this argument's replacement position.
  -     */
  -    public void setPosition(int position) {
  -        this.position = position;
       }
   
   }