/[classpath]/classpath/java/util/Vector.java
ViewVC logotype

Diff of /classpath/java/util/Vector.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by ericb, Mon Oct 22 05:48:01 2001 UTC revision 1.16 by ericb, Wed Oct 31 01:00:30 2001 UTC
# Line 32  import java.io.Serializable; Line 32  import java.io.Serializable;
32  /**  /**
33   * The <code>Vector</code> classes implements growable arrays of Objects.   * The <code>Vector</code> classes implements growable arrays of Objects.
34   * You can access elements in a Vector with an index, just as you   * You can access elements in a Vector with an index, just as you
35   * can in a built in array, but Vectors can grow and shrink to accomodate   * can in a built in array, but Vectors can grow and shrink to accommodate
36   * more or fewer objects.<p>   * more or fewer objects.<p>
37   *   *
38   * Vectors try to mantain efficiency in growing by having a   * Vectors try to mantain efficiency in growing by having a
# Line 300  public class Vector extends AbstractList Line 300  public class Vector extends AbstractList
300    }    }
301    
302    /**    /**
303     * Returns the first occurence of <code>elem</code> in the Vector, or -1 if     * Returns the first occurrence of <code>elem</code> in the Vector, or -1 if
304     * <code>elem</code> is not found.     * <code>elem</code> is not found.
305     *     *
306     * @param elem the object to search for     * @param elem the object to search for
307     * @return the index of the first occurence, or -1 if not found     * @return the index of the first occurrence, or -1 if not found
308     */     */
309    public int indexOf(Object elem)    public int indexOf(Object elem)
310    {    {
# Line 313  public class Vector extends AbstractList Line 313  public class Vector extends AbstractList
313    
314    /**    /**
315     * Searches the vector starting at <code>index</code> for object     * Searches the vector starting at <code>index</code> for object
316     * <code>elem</code> and returns the index of the first occurence of this     * <code>elem</code> and returns the index of the first occurrence of this
317     * Object.  If the object is not found, or index is larger than the size     * Object.  If the object is not found, or index is larger than the size
318     * of the vector, -1 is returned.     * of the vector, -1 is returned.
319     *     *
320     * @param e the Object to search for     * @param e the Object to search for
321     * @param index start searching at this index     * @param index start searching at this index
322     * @return the index of the next occurence, or -1 if it is not found     * @return the index of the next occurrence, or -1 if it is not found
323     * @throws IndexOutOfBoundsException if index &lt; 0     * @throws IndexOutOfBoundsException if index &lt; 0
324     */     */
325    public synchronized int indexOf(Object e, int index)    public synchronized int indexOf(Object e, int index)
# Line 343  public class Vector extends AbstractList Line 343  public class Vector extends AbstractList
343    }    }
344    
345    /**    /**
346     * Returns the index of the first occurence of <code>elem</code>, when     * Returns the index of the first occurrence of <code>elem</code>, when
347     * searching backwards from <code>index</code>.  If the object does not     * searching backwards from <code>index</code>.  If the object does not
348     * occur in this Vector, or index is less than 0, -1 is returned.     * occur in this Vector, or index is less than 0, -1 is returned.
349     *     *

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26