list.html
来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 556 行 · 第 1/2 页
HTML
556 行
</TR></TABLE><A NAME="List()"><!-- --></A><H3>List</H3><PRE> <B>List</B>()</PRE><DL><DD>Constructs a new List instance with initial capacity of 10 elements.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="size()"><!-- --></A><H3>size</H3><PRE> int <B>size</B>()</PRE><DL><DD>Returns the number of elements in this list.<P><DD><DL><DT><B>Returns:</B><DD>the number of elements in this list.</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE> void <B>clear</B>()</PRE><DL><DD>Removes all of the elements from this list. This list will be empty after this call returns.<P><DD><DL></DL></DD></DL><HR><A NAME="add(int, Object)"><!-- --></A><H3>add</H3><PRE> <A HREF="../../widsets/api/List.html" title="class in ">List</A> <B>add</B>(int index, <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> element)</PRE><DL><DD>Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index at which the specified element is to be inserted.<DD><CODE>element</CODE> - element to be inserted.<DT><B>Returns:</B><DD>this <code>List</code> instance</DL></DD></DL><HR><A NAME="add(Object)"><!-- --></A><H3>add</H3><PRE> <A HREF="../../widsets/api/List.html" title="class in ">List</A> <B>add</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A> element)</PRE><DL><DD>Appends the specified element to the end of this list<P><DD><DL><DT><B>Parameters:</B><DD><CODE>element</CODE> - element to be appended to this list.<DT><B>Returns:</B><DD>this <code>List</code> instance</DL></DD></DL><HR><A NAME="remove(int)"><!-- --></A><H3>remove</H3><PRE> <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> <B>remove</B>(int index)</PRE><DL><DD>Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the index of the element to removed.<DT><B>Returns:</B><DD>the element previously at the specified position.</DL></DD></DL><HR><A NAME="indexOf(Object)"><!-- --></A><H3>indexOf</H3><PRE> int <B>indexOf</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A> obj)</PRE><DL><DD>Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - element to search for.<DT><B>Returns:</B><DD>the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element.</DL></DD></DL><HR><A NAME="lastIndexOf(Object)"><!-- --></A><H3>lastIndexOf</H3><PRE> int <B>lastIndexOf</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A> obj)</PRE><DL><DD>Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - element to search for.<DT><B>Returns:</B><DD>the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.</DL></DD></DL><HR><A NAME="pop()"><!-- --></A><H3>pop</H3><PRE> <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> <B>pop</B>()</PRE><DL><DD>Removes the object at the end of of this list and returns that object as the value of this function.<P><DD><DL><DT><B>Returns:</B><DD>The object at the end of this list</DL></DD></DL><HR><A NAME="push(Object)"><!-- --></A><H3>push</H3><PRE> void <B>push</B>(<A HREF="../../widsets/api/Object.html" title="class in ">Object</A> element)</PRE><DL><DD>Pushes an item onto the end of this list. This has exactly the same effect as: <blockquote><pre> add(item)</pre></blockquote><P><DD><DL><DT><B>Parameters:</B><DD><CODE>element</CODE> - the item to be pushed onto this stack.</DL></DD></DL><HR><A NAME="operator_get(int)"><!-- --></A><H3>operator_get</H3><PRE> <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> <B>operator_get</B>(int index)</PRE><DL><DD>An operator that returns the element at the specified position in this list. <p> <code>List list = ...;<br>Object o = list[i];</code><P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to return.<DT><B>Returns:</B><DD>the element at the specified position in this list.<DT><B>See Also:</B><DD><a href="package-summary.html#operator_get">get</a></DL></DD></DL><HR><A NAME="operator_set(int, Object)"><!-- --></A><H3>operator_set</H3><PRE> <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> <B>operator_set</B>(int index, <A HREF="../../widsets/api/Object.html" title="class in ">Object</A> element)</PRE><DL><DD>Replaces the element at the specified position in this list with the specified element. <p> <code>List list = ...;<br>list[i] = "hello";</code><P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - index of element to replace.<DD><CODE>element</CODE> - element to be stored at the specified position.<DT><B>Returns:</B><DD>the element<DT><B>See Also:</B><DD><a href="package-summary.html#operator_set">set</a></DL></DD></DL><HR><A NAME="sort(Comparator)"><!-- --></A><H3>sort</H3><PRE> void <B>sort</B>(<A HREF="../../widsets/api/Comparator.html" title="interface in ">Comparator</A> comparator)</PRE><DL><DD><p> Sorts this list according to the order induced by the specified comparator. </p> <p> A <A HREF="../../widsets/api/Comparator.html" title="interface in "><CODE>Comparator</CODE></A> <a href="package-summary.html#callbacks">callback</a> function is given that will determine the ordering of successive elements. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>comparator</CODE> - The comparator to determine the order of the list.<DT><B>See Also:</B><DD><a href="package-summary.html#callbacks">Callbacks</a></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../widsets/api/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="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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../widsets/api/Label.html" title="class in "><B>PREV CLASS</B></A> <A HREF="../../widsets/api/Map.html" title="class in "><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?widsets/api/List.html" target="_top"><B>FRAMES</B></A> <A HREF="List.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?