value.html
来自「维信SDK文档。源码要求为至少5个C或Java源码」· HTML 代码 · 共 672 行 · 第 1/2 页
HTML
672 行
</TABLE> <P><!-- ============ 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="type()"><!-- --></A><H3>type</H3><PRE> int <B>type</B>()</PRE><DL><DD>Returns the type of Value.<P><DD><DL><DT><B>Returns:</B><DD>type of Value<DT><B>See Also:</B><DD><A HREF="../../widsets/api/API.html#IS_NULL"><CODE>IS_NULL</CODE></A>, <A HREF="../../widsets/api/API.html#IS_BOOLEAN"><CODE>IS_BOOLEAN</CODE></A>, <A HREF="../../widsets/api/API.html#IS_INT"><CODE>IS_INT</CODE></A>, <A HREF="../../widsets/api/API.html#IS_STRING"><CODE>IS_STRING</CODE></A>, <A HREF="../../widsets/api/API.html#IS_LIST"><CODE>IS_LIST</CODE></A>, <A HREF="../../widsets/api/API.html#IS_BINDING"><CODE>IS_BINDING</CODE></A>, <A HREF="../../widsets/api/API.html#IS_BINARY"><CODE>IS_BINARY</CODE></A></DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE> int <B>size</B>()</PRE><DL><DD>Returns the size of elements in this Value. <ul> <li><code>IS_LIST</code>: number of elements <li><code>IS_STRING</code>: length of String <li><code>IS_BINARY</code>: size of ByteArray <li><code>IS_BINDING</code>: always two </ul><P><DD><DL><DT><B>Returns:</B><DD>size of this Value.</DL></DD></DL><HR><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>copy</B>()</PRE><DL><DD>Returns duplicate of this Value.<P><DD><DL><DT><B>Returns:</B><DD>New instance of this value</DL></DD></DL><HR><A NAME="add(Value)"><!-- --></A><H3>add</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>add</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> value)</PRE><DL><DD>Adds a new element to this Value. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - Element to add<DT><B>Returns:</B><DD>this Value</DL></DD></DL><HR><A NAME="remove(Value)"><!-- --></A><H3>remove</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>remove</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> value)</PRE><DL><DD>Removes an element from this Value. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - Element to remove<DT><B>Returns:</B><DD>this Value</DL></DD></DL><HR><A NAME="remove(int)"><!-- --></A><H3>remove</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>remove</B>(int index)</PRE><DL><DD>Removes an element at specified index from this Value. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of element, must be on range <code>[0..size()-1]</code><DT><B>Returns:</B><DD>this Value</DL></DD></DL><HR><A NAME="operator_get(int)"><!-- --></A><H3>operator_get</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_get</B>(int index)</PRE><DL><DD>Returns an element at specified index. Only meaningful when type is <code>IS_LIST</code> or <code>IS_BINDING</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of element, must be on range <code>[0..size()-1]</code><DT><B>Returns:</B><DD>Value at specified index</DL></DD></DL><HR><A NAME="operator_get(Value)"><!-- --></A><H3>operator_get</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_get</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> key)</PRE><DL><DD>Returns right side of <code>IS_BINDING</code> that has a key matching given argument. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to look for<DT><B>Returns:</B><DD>Found value or <code>IS_NULL</code> if it wasn't found.</DL></DD></DL><HR><A NAME="operator_get(String)"><!-- --></A><H3>operator_get</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_get</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A> key)</PRE><DL><DD>Returns right side of <code>IS_BINDING</code> that has a key that matches given argument. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to look for<DT><B>Returns:</B><DD>Found value or <code>IS_NULL</code> if it wasn't found.</DL></DD></DL><HR><A NAME="operator_set(int, Value)"><!-- --></A><H3>operator_set</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_set</B>(int index, <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> value)</PRE><DL><DD>Sets element at specified index. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - Index of element, must be on range <code>[0..size()-1]</code><DD><CODE>value</CODE> - Element to set</DL></DD></DL><HR><A NAME="operator_set(Value, Value)"><!-- --></A><H3>operator_set</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_set</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> key, <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> value)</PRE><DL><DD>Sets right side of <code>IS_BINDING</code> that has a key matching given argument. If there wasn't any such binding, adds a new binding. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to look for<DD><CODE>value</CODE> - Element to set</DL></DD></DL><HR><A NAME="operator_set(String, Value)"><!-- --></A><H3>operator_set</H3><PRE> <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> <B>operator_set</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A> key, <A HREF="../../widsets/api/Value.html" title="class in ">Value</A> value)</PRE><DL><DD>Sets right side of <code>IS_BINDING</code> that has a key matching given argument. If there wasn't any such binding, adds a new binding. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to look for<DD><CODE>value</CODE> - Element to set</DL></DD></DL><HR><A NAME="contains(String)"><!-- --></A><H3>contains</H3><PRE> boolean <B>contains</B>(<A HREF="../../widsets/api/String.html" title="class in ">String</A> key)</PRE><DL><DD>Checks if any of the child elements with type <code>IS_BINDING</code> has a matching key. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Returns:</B><DD><code>true</code> if matching binding was found, <code>false</code> otherwise</DL></DD></DL><HR><A NAME="contains(Value)"><!-- --></A><H3>contains</H3><PRE> boolean <B>contains</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> key)</PRE><DL><DD>Checks if any of the child elements matches given Value. Only meaningful when type is <code>IS_LIST</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - Key to search for<DT><B>Returns:</B><DD><code>true</code> if element was found, <code>false</code> otherwise</DL></DD></DL><HR><A NAME="operator_append(Value)"><!-- --></A><H3>operator_append</H3><PRE> void <B>operator_append</B>(<A HREF="../../widsets/api/Value.html" title="class in ">Value</A> element)</PRE><DL><DD>Array append support, see class description.<P><DD><DL></DL></DD></DL><HR><A NAME="isNull()"><!-- --></A><H3>isNull</H3><PRE> boolean <B>isNull</B>()</PRE><DL><DD>Checks if this Value is <code>IS_NULL</code>.<P><DD><DL><DT><B>Returns:</B><DD><code>true</code> if <code>IS_NULL</code>, false otherwise.</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/TimeZone.html" title="class in "><B>PREV CLASS</B></A> <A HREF="../../widsets/api/View.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/Value.html" target="_top"><B>FRAMES</B></A> <A HREF="Value.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <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 + -
显示快捷键?