commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/mutable Mutable.java
Date Mon, 05 Jul 2004 22:12:22 GMT
scolebourne    2004/07/05 15:12:22

  Modified:    lang/src/java/org/apache/commons/lang/mutable Mutable.java
  Log:
  Improve javadocs
  
  Revision  Changes    Path
  1.2       +19 -8     jakarta-commons/lang/src/java/org/apache/commons/lang/mutable/Mutable.java
  
  Index: Mutable.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/mutable/Mutable.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Mutable.java	11 Jun 2004 02:26:32 -0000	1.1
  +++ Mutable.java	5 Jul 2004 22:12:22 -0000	1.2
  @@ -16,7 +16,16 @@
   package org.apache.commons.lang.mutable;
   
   /**
  - * A mutable object.
  + * Defines an object that allows mutable access to a value.
  + * <p>
  + * <code>Mutable</code> is used as a generic interface to the implementations
  + * in this package.
  + * <p>
  + * A typical use case would be to enable a primitive or string to be passed
  + * to a method and allow that method to effectively change the value of the
  + * primitive/string. Another use case is to store a frequently changing
  + * primitive in a collection (for example a total in a map) without needing
  + * to create new Integer/Long wrapper objects.
    *
    * @author Matthew Hawthorne
    * @since 2.1
  @@ -25,17 +34,19 @@
   public interface Mutable {
   
       /**
  -     * Sets the value of this object.
  +     * Gets the value of this mutable.
        *
  -     * @param value the value of this object.
  +     * @return the stored value
        */
  -    public void setValue(Object value);
  +    Object getValue();
   
       /**
  -     * Gets the value of this object.
  +     * Sets the value of this mutable.
        *
  -     * @return a value.
  +     * @param value  the value to store
  +     * @throws NullPointerException if the object is null and null is invalid
  +     * @throws ClassCastException if the type is invalid
        */
  -    public Object getValue();
  +    void setValue(Object value);
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message