You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ps...@apache.org on 2004/06/08 16:19:40 UTC

cvs commit: jakarta-commons/math/src/java/org/apache/commons/math/util DoubleArray.java

psteitz     2004/06/08 07:19:40

  Modified:    math/src/java/org/apache/commons/math/util DoubleArray.java
  Log:
  Javadoc only.
  
  Revision  Changes    Path
  1.11      +13 -7     jakarta-commons/math/src/java/org/apache/commons/math/util/DoubleArray.java
  
  Index: DoubleArray.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/java/org/apache/commons/math/util/DoubleArray.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DoubleArray.java	19 May 2004 14:16:32 -0000	1.10
  +++ DoubleArray.java	8 Jun 2004 14:19:40 -0000	1.11
  @@ -22,6 +22,7 @@
    * Collections API by allowing a user to select from a number of 
    * array implementations with support for various storage mechanisms
    * such as automatic expansion, contraction, and array "rolling".
  + * 
    * @version $Revision$ $Date$
    */
   public interface DoubleArray {
  @@ -46,13 +47,14 @@
       double getElement(int index);
   
       /**
  -     * Sets the element at the specified index.  This method will expand the 
  +     * Sets the element at the specified index.  This method may expand the 
        * internal storage array to accomodate the insertion of a value at an 
        * index beyond the current capacity.
  +     * 
        * @param index index to store a value in
        * @param value value to store at the specified index
        * @throws ArrayIndexOutOfBoundsException if <code>index</code> is less than
  -     *         zero or is greater than <code>getNumElements() - 1</code>.
  +     *         zero.
        */
       void setElement(int index, double value);
   
  @@ -65,13 +67,17 @@
   
       /**
        * Adds an element and moves the window of elements up one.  This
  -     * has the effect of a FIFO.  when you "roll" the array an element is 
  -     * removed from the array.  The return value of this function is the 
  -     * discarded double.
  +     * has the effect of a FIFO.  when you "roll" the array an element may be 
  +     * removed from the array.  In this case, the return value of this function is the 
  +     * discarded double.  In some implementations, removal will only occur when
  +     * the array has reached a capacity threshold.  
  +     * <p>
  +     * When removal does occur, the effect is to add an element to the end of the
  +     * array and to discard the element at the beginning of the array.
        * 
        * @param value the value to be added to the array
        * @return the value which has been discarded or "pushed" out of the array
  -     *         by this rolling insert.
  +     *         by this rolling insert or null if no value has been discarded
        */
       double addElementRolling(double value);
   
  
  
  

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