📄 tabulardatasupport.html
字号:
</DL><HR><A NAME="put(javax.management.openmbean.CompositeData)"><!-- --></A><H3>put</H3><PRE>public void <B>put</B>(<A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A> value)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></B></DD><DD>Adds <var>value</var> to this <tt>TabularData</tt> instance. The composite type of <var>value</var> must be the same as this instance's row type (ie the composite type returned by <tt>this.getTabularType().<A HREF="../../../javax/management/openmbean/TabularType.html#getRowType()"><CODE>getRowType()</CODE></A></tt>), and there must not already be an existing value in this <tt>TabularData</tt> instance whose index is the same as the one calculated for the <var>value</var> to be added. The index for <var>value</var> is calculated according to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition (see <tt>TabularType.<A HREF="../../../javax/management/openmbean/TabularType.html#getIndexNames()"><CODE>getIndexNames()</CODE></A></tt>).<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#put(javax.management.openmbean.CompositeData)">put</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the composite data value to be added as a new row to this <tt>TabularData</tt> instance; must be of the same composite type as this instance's row type; must not be null.</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> key)</PRE><DL><DD>This method simply calls <tt>remove((Object[]) key)</tt>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html#remove(java.lang.Object)" title="class or interface in java.util">remove</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - an <tt>Object[]</tt> representing the key to remove.<DT><B>Returns:</B><DD>previous value associated with specified key, or <tt>null</tt> if there was no mapping for key.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the <var>key</var> is <tt>null</tt><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if the <var>key</var> is not of the type <tt>Object[]</tt><DD><CODE><A HREF="../../../javax/management/openmbean/InvalidKeyException.html" title="class in javax.management.openmbean">InvalidKeyException</A></CODE> - if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition</DL></DD></DL><HR><A NAME="remove(java.lang.Object[])"><!-- --></A><H3>remove</H3><PRE>public <A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A> <B>remove</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[] key)</PRE><DL><DD>Removes the <tt>CompositeData</tt> value whose index is <var>key</var> from this <tt>TabularData</tt> instance, and returns the removed value, or returns <tt>null</tt> if there is no value whose index is <var>key</var>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#remove(java.lang.Object[])">remove</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>key</CODE> - the index of the value to get in this <tt>TabularData</tt> instance; must be valid with this <tt>TabularData</tt> instance's row type definition; must not be null.<DT><B>Returns:</B><DD>previous value associated with specified key, or <tt>null</tt> if there was no mapping for key.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if the <var>key</var> is <tt>null</tt><DD><CODE><A HREF="../../../javax/management/openmbean/InvalidKeyException.html" title="class in javax.management.openmbean">InvalidKeyException</A></CODE> - if the <var>key</var> does not conform to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition</DL></DD></DL><HR><A NAME="putAll(java.util.Map)"><!-- --></A><H3>putAll</H3><PRE>public void <B>putAll</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A> t)</PRE><DL><DD>Add all the values contained in the specified map <var>t</var> to this <tt>TabularData</tt> instance. This method converts the collection of values contained in this map into an array of <tt>CompositeData</tt> values, if possible, and then call the method <tt>putAll(CompositeData[])</tt>. Note that the keys used in the specified map <var>t</var> are ignored. This method allows, for example to add the content of another <tt>TabularData</tt> instance with the same row type (but possibly different index names) into this instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html#putAll(java.util.Map)" title="class or interface in java.util">putAll</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the map whose values are to be added as new rows to this <tt>TabularData</tt> instance; if <var>t</var> is <tt>null</tt> or empty, this method returns without doing anything.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a value in <var>t</var> is <tt>null</tt>.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassCastException.html" title="class or interface in java.lang">ClassCastException</A></CODE> - if a value in <var>t</var> is not an instance of <tt>CompositeData</tt>.<DD><CODE><A HREF="../../../javax/management/openmbean/InvalidOpenTypeException.html" title="class in javax.management.openmbean">InvalidOpenTypeException</A></CODE> - if a value in <var>t</var> does not conform to this <tt>TabularData</tt> instance's row type definition.<DD><CODE><A HREF="../../../javax/management/openmbean/KeyAlreadyExistsException.html" title="class in javax.management.openmbean">KeyAlreadyExistsException</A></CODE> - if the index for a value in <var>t</var>, calculated according to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition already maps to an existing value in this instance, or two values in <var>t</var> have the same index.</DL></DD></DL><HR><A NAME="putAll(javax.management.openmbean.CompositeData[])"><!-- --></A><H3>putAll</H3><PRE>public void <B>putAll</B>(<A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A>[] values)</PRE><DL><DD>Add all the elements in <var>values</var> to this <tt>TabularData</tt> instance. If any element in <var>values</var> does not satisfy the constraints defined in <A HREF="../../../javax/management/openmbean/TabularDataSupport.html#put(javax.management.openmbean.CompositeData)"><CODE><tt>put</tt></CODE></A>, or if any two elements in <var>values</var> have the same index calculated according to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition, then an exception describing the failure is thrown and no element of <var>values</var> is added, thus leaving this <tt>TabularData</tt> instance unchanged.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#putAll(javax.management.openmbean.CompositeData[])">putAll</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>values</CODE> - the array of composite data values to be added as new rows to this <tt>TabularData</tt> instance; if <var>values</var> is <tt>null</tt> or empty, this method returns without doing anything.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if an element of <var>values</var> is <tt>null</tt><DD><CODE><A HREF="../../../javax/management/openmbean/InvalidOpenTypeException.html" title="class in javax.management.openmbean">InvalidOpenTypeException</A></CODE> - if an element of <var>values</var> does not conform to this <tt>TabularData</tt> instance's row type definition (ie its <tt>TabularType</tt> definition)<DD><CODE><A HREF="../../../javax/management/openmbean/KeyAlreadyExistsException.html" title="class in javax.management.openmbean">KeyAlreadyExistsException</A></CODE> - if the index for an element of <var>values</var>, calculated according to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition already maps to an existing value in this instance, or two elements of <var>values</var> have the same index</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>Removes all rows from this <code>TabularDataSupport</code> instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#clear()">clear</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Returns the number of rows in this <code>TabularDataSupport</code> instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#size()">size</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of rows in this <code>TabularDataSupport</code> instance.</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Returns <tt>true</tt> if this <code>TabularDataSupport</code> instance contains no rows.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD><tt>true</tt> if this <code>TabularDataSupport</code> instance contains no rows.</DL></DD></DL><HR><A NAME="keySet()"><!-- --></A><H3>keySet</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A> <B>keySet</B>()</PRE><DL><DD>Returns a set view of the keys contained in the underlying map of this <code>TabularDataSupport</code> instance, and used to index the rows. Each key contained in this set is an unmodifiable List. The set is backed by the underlying map of this <code>TabularDataSupport</code> instance, so changes to the <code>TabularDataSupport</code> instance are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding row from this <code>TabularDataSupport</code> instance, via the <tt>Iterator.remove</tt>, <tt>Set.remove</tt>, <tt>removeAll</tt>, <tt>retainAll</tt>, and <tt>clear</tt> operations. It does not support the <tt>add</tt> or <tt>addAll</tt> operations<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#keySet()">keySet</A></CODE> in interface <CODE><A HREF="../../../javax/management/openmbean/TabularData.html" title="interface in javax.management.openmbean">TabularData</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a set view of the keys used to index the rows of this <code>TabularDataSupport</code> instance.</DL></DD></DL><HR><A NAME="values()"><!-- --></A><H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -