📄 vector.html
字号:
</DD>
</DL>
<HR>
<A NAME="elements()"><!-- --></A><H3>
elements</H3>
<PRE>
public <A HREF="../../java/util/Enumeration.html">Enumeration</A> <B>elements</B>()</PRE>
<DL>
<DD>Returns an enumeration of the components of this vector.<DD><DL>
<DT><B>Returns:</B><DD>an enumeration of the components of this vector.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/util/Enumeration.html"><CODE>Enumeration</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="contains(java.lang.Object)"><!-- --></A><H3>
contains</H3>
<PRE>
public boolean <B>contains</B>(<A HREF="../../java/lang/Object.html">Object</A> elem)</PRE>
<DL>
<DD>Tests if the specified object is a component in this vector.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - an object.<DT><B>Returns:</B><DD><code>true</code> if the specified object is a component in this vector; <code>false</code> otherwise.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(java.lang.Object)"><!-- --></A><H3>
indexOf</H3>
<PRE>
public int <B>indexOf</B>(<A HREF="../../java/lang/Object.html">Object</A> elem)</PRE>
<DL>
<DD>Searches for the first occurence of the given argument, testing for equality using the <code>equals</code> method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - an object.<DT><B>Returns:</B><DD>the index of the first occurrence of the argument in this vector; returns <code>-1</code> if the object is not found.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="indexOf(java.lang.Object, int)"><!-- --></A><H3>
indexOf</H3>
<PRE>
public int <B>indexOf</B>(<A HREF="../../java/lang/Object.html">Object</A> elem, int index)</PRE>
<DL>
<DD>Searches for the first occurence of the given argument, beginning the search at <code>index</code>, and testing for equality using the <code>equals</code> method.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - an object.<DD><CODE>index</CODE> - the index to start searching from.<DT><B>Returns:</B><DD>the index of the first occurrence of the object argument in this vector at position <code>index</code> or later in the vector; returns <code>-1</code> if the object is not found.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/lang/Object.html#equals(java.lang.Object)"><CODE>Object.equals(java.lang.Object)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOf(java.lang.Object)"><!-- --></A><H3>
lastIndexOf</H3>
<PRE>
public int <B>lastIndexOf</B>(<A HREF="../../java/lang/Object.html">Object</A> elem)</PRE>
<DL>
<DD>Returns the index of the last occurrence of the specified object in this vector.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - the desired component.<DT><B>Returns:</B><DD>the index of the last occurrence of the specified object in this vector; returns <code>-1</code> if the object is not found.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOf(java.lang.Object, int)"><!-- --></A><H3>
lastIndexOf</H3>
<PRE>
public int <B>lastIndexOf</B>(<A HREF="../../java/lang/Object.html">Object</A> elem, int index)</PRE>
<DL>
<DD>Searches backwards for the specified object, starting from the specified index, and returns an index to it.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>elem</CODE> - the desired component.<DD><CODE>index</CODE> - the index to start searching from.<DT><B>Returns:</B><DD>the index of the last occurrence of the specified object in this vector at position less than <code>index</code> in the vector; <code>-1</code> if the object is not found.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IndexOutOfBoundsException.html">IndexOutOfBoundsException</A></CODE> - if <tt>index</tt> is greater than or equal to the current size of this vector.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="elementAt(int)"><!-- --></A><H3>
elementAt</H3>
<PRE>
public <A HREF="../../java/lang/Object.html">Object</A> <B>elementAt</B>(int index)</PRE>
<DL>
<DD>Returns the component at the specified index.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - an index into this vector.<DT><B>Returns:</B><DD>the component at the specified index.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if an invalid index was given.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="firstElement()"><!-- --></A><H3>
firstElement</H3>
<PRE>
public <A HREF="../../java/lang/Object.html">Object</A> <B>firstElement</B>()</PRE>
<DL>
<DD>Returns the first component of this vector.<DD><DL>
<DT><B>Returns:</B><DD>the first component of this vector.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - if this vector has no components.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="lastElement()"><!-- --></A><H3>
lastElement</H3>
<PRE>
public <A HREF="../../java/lang/Object.html">Object</A> <B>lastElement</B>()</PRE>
<DL>
<DD>Returns the last component of the vector.<DD><DL>
<DT><B>Returns:</B><DD>the last component of the vector, i.e., the component at index <code>size() - 1</code>.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/util/NoSuchElementException.html">NoSuchElementException</A></CODE> - if this vector is empty.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setElementAt(java.lang.Object, int)"><!-- --></A><H3>
setElementAt</H3>
<PRE>
public void <B>setElementAt</B>(<A HREF="../../java/lang/Object.html">Object</A> obj, int index)</PRE>
<DL>
<DD>Sets the component at the specified <code>index</code> of this vector to be the specified object. The previous component at that position is discarded. <p> The index must be a value greater than or equal to <code>0</code> and less than the current size of the vector.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - what the component is to be set to.<DD><CODE>index</CODE> - the specified index.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if the index was invalid.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/util/Vector.html#size()"><CODE>size()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="removeElementAt(int)"><!-- --></A><H3>
removeElementAt</H3>
<PRE>
public void <B>removeElementAt</B>(int index)</PRE>
<DL>
<DD>Deletes the component at the specified index. Each component in this vector with an index greater or equal to the specified <code>index</code> is shifted downward to have an index one smaller than the value it had previously. <p> The index must be a value greater than or equal to <code>0</code> and less than the current size of the vector.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the object to remove.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if the index was invalid.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/util/Vector.html#size()"><CODE>size()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="insertElementAt(java.lang.Object, int)"><!-- --></A><H3>
insertElementAt</H3>
<PRE>
public void <B>insertElementAt</B>(<A HREF="../../java/lang/Object.html">Object</A> obj, int index)</PRE>
<DL>
<DD>Inserts the specified object as a component in this vector at the specified <code>index</code>. Each component in this vector with an index greater or equal to the specified <code>index</code> is shifted upward to have an index one greater than the value it had previously. <p> The index must be a value greater than or equal to <code>0</code> and less than or equal to the current size of the vector.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the component to insert.<DD><CODE>index</CODE> - where to insert the new component.<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if the index was invalid.<DT><B>Since: </B><DD>JDK1.0</DD>
<DT><B>See Also: </B><DD><A HREF="../../java/util/Vector.html#size()"><CODE>size()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="addElement(java.lang.Object)"><!-- --></A><H3>
addElement</H3>
<PRE>
public void <B>addElement</B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</PRE>
<DL>
<DD>Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the component to be added.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeElement(java.lang.Object)"><!-- --></A><H3>
removeElement</H3>
<PRE>
public boolean <B>removeElement</B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</PRE>
<DL>
<DD>Removes the first occurrence of the argument from this vector. If the object is found in this vector, each component in the vector with an index greater or equal to the object's index is shifted downward to have an index one smaller than the value it had previously.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>obj</CODE> - the component to be removed.<DT><B>Returns:</B><DD><code>true</code> if the argument was a component of this vector; <code>false</code> otherwise.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="removeAllElements()"><!-- --></A><H3>
removeAllElements</H3>
<PRE>
public void <B>removeAllElements</B>()</PRE>
<DL>
<DD>Removes all components from this vector and sets its size to zero.<DD><DL>
<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns a string representation of this vector.<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/lang/Object.html">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a string representation of this vector.<DT><B>Since: </B><DD>JDK1.0</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Vector.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<strong>MID Profile</strong></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../java/util/TimeZone.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="Vector.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<font size="-1"><a href="mailto:midp-feedback@risc.sps.mot.com">Submit a comment or suggestion</a> Version 2.0 of MID Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -