📄 tabulardatasupport.html
字号:
public <B>TabularDataSupport</B>(<A HREF="../../../javax/management/openmbean/TabularType.html" title="class in javax.management.openmbean">TabularType</A> tabularType, int initialCapacity, float loadFactor)</PRE><DL><DD>Creates an empty <tt>TabularDataSupport</tt> instance whose open-type is <var>tabularType</var>, and whose underlying <tt>HashMap</tt> has the specified initial capacity and load factor.<P><DT><B>Parameters:</B><DD><CODE>tabularType</CODE> - the <i>tabular type</i> describing this <tt>TabularData</tt> instance; cannot be null.<DD><CODE>initialCapacity</CODE> - the initial capacity of the HashMap.<DD><CODE>loadFactor</CODE> - the load factor of the HashMap<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the initial capacity is less than zero, or the load factor is nonpositive, or the tabular type is null.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getTabularType()"><!-- --></A><H3>getTabularType</H3><PRE>public <A HREF="../../../javax/management/openmbean/TabularType.html" title="class in javax.management.openmbean">TabularType</A> <B>getTabularType</B>()</PRE><DL><DD>Returns the <i>tabular type</i> describing this <tt>TabularData</tt> instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#getTabularType()">getTabularType</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 tabular type.</DL></DD></DL><HR><A NAME="calculateIndex(javax.management.openmbean.CompositeData)"><!-- --></A><H3>calculateIndex</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>calculateIndex</B>(<A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A> value)</PRE><DL><DD>Calculates the index that would be used in this <tt>TabularData</tt> instance to refer to the specified composite data <var>value</var> parameter if it were added to this instance. This method checks for the type validity of the specified <var>value</var>, but does not check if the calculated index is already used to refer to a value in this <tt>TabularData</tt> instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#calculateIndex(javax.management.openmbean.CompositeData)">calculateIndex</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 whose index in this <tt>TabularData</tt> instance is to be calculated; must be of the same composite type as this instance's row type; must not be null.<DT><B>Returns:</B><DD>the index that the specified <var>value</var> would have in this <tt>TabularData</tt> instance.<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 <var>value</var> is <tt>null</tt>.<DD><CODE><A HREF="../../../javax/management/openmbean/InvalidOpenTypeException.html" title="class in javax.management.openmbean">InvalidOpenTypeException</A></CODE> - if <var>value</var> does not conform to this <tt>TabularData</tt> instance's row type definition.</DL></DD></DL><HR><A NAME="containsKey(java.lang.Object)"><!-- --></A><H3>containsKey</H3><PRE>public boolean <B>containsKey</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>Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value (ie a row) whose index is the specified <var>key</var>. If <var>key</var> cannot be cast to a one dimension array of Object instances, this method simply returns <tt>false</tt>; otherwise it returns the the result of the call to <tt>this.containsKey((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#containsKey(java.lang.Object)" title="class or interface in java.util">containsKey</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> - the index value whose presence in this <tt>TabularData</tt> instance is to be tested.<DT><B>Returns:</B><DD><tt>true</tt> if this <tt>TabularData</tt> indexes a row value with the specified key.</DL></DD></DL><HR><A NAME="containsKey(java.lang.Object[])"><!-- --></A><H3>containsKey</H3><PRE>public boolean <B>containsKey</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>Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains a <tt>CompositeData</tt> value (ie a row) whose index is the specified <var>key</var>. If <var>key</var> is <tt>null</tt> or does not conform to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition, this method simply returns <tt>false</tt>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#containsKey(java.lang.Object[])">containsKey</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 value whose presence in this <tt>TabularData</tt> instance is to be tested.<DT><B>Returns:</B><DD><tt>true</tt> if this <tt>TabularData</tt> indexes a row value with the specified key.</DL></DD></DL><HR><A NAME="containsValue(javax.management.openmbean.CompositeData)"><!-- --></A><H3>containsValue</H3><PRE>public boolean <B>containsValue</B>(<A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A> value)</PRE><DL><DD>Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains the specified <tt>CompositeData</tt> value. If <var>value</var> is <tt>null</tt> or does not conform to this <tt>TabularData</tt> instance's row type definition, this method simply returns <tt>false</tt>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#containsValue(javax.management.openmbean.CompositeData)">containsValue</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 row value whose presence in this <tt>TabularData</tt> instance is to be tested.<DT><B>Returns:</B><DD><tt>true</tt> if this <tt>TabularData</tt> instance contains the specified row value.</DL></DD></DL><HR><A NAME="containsValue(java.lang.Object)"><!-- --></A><H3>containsValue</H3><PRE>public boolean <B>containsValue</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> value)</PRE><DL><DD>Returns <tt>true</tt> if and only if this <tt>TabularData</tt> instance contains the specified value.<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#containsValue(java.lang.Object)" title="class or interface in java.util">containsValue</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>value</CODE> - the row value whose presence in this <tt>TabularData</tt> instance is to be tested.<DT><B>Returns:</B><DD><tt>true</tt> if this <tt>TabularData</tt> instance contains the specified row value.</DL></DD></DL><HR><A NAME="get(java.lang.Object)"><!-- --></A><H3>get</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>get</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>get((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#get(java.lang.Object)" title="class or interface in java.util">get</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>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="get(java.lang.Object[])"><!-- --></A><H3>get</H3><PRE>public <A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean">CompositeData</A> <B>get</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>Returns the <tt>CompositeData</tt> value whose index is <var>key</var>, or <tt>null</tt> if there is no value mapping to <var>key</var>, in this <tt>TabularData</tt> instance.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/openmbean/TabularData.html#get(java.lang.Object[])">get</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>the value corresponding to <var>key</var>.<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> type definition.</DL></DD></DL><HR><A NAME="put(java.lang.Object, java.lang.Object)"><!-- --></A><H3>put</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>put</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, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> value)</PRE><DL><DD>This method simply calls <tt>put((CompositeData) value)</tt> and therefore ignores its <var>key</var> parameter which can be <tt>null</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#put(java.lang.Object, java.lang.Object)" title="class or interface in java.util">put</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 ignored parameter.<DD><CODE>value</CODE> - the <A HREF="../../../javax/management/openmbean/CompositeData.html" title="interface in javax.management.openmbean"><CODE>CompositeData</CODE></A> to put.<DT><B>Returns:</B><DD>the value which is put<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>value</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>value</var> is not of the type <tt>CompositeData</tt><DD><CODE><A HREF="../../../javax/management/openmbean/InvalidOpenTypeException.html" title="class in javax.management.openmbean">InvalidOpenTypeException</A></CODE> - if the <var>value</var> does not conform to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition<DD><CODE><A HREF="../../../javax/management/openmbean/KeyAlreadyExistsException.html" title="class in javax.management.openmbean">KeyAlreadyExistsException</A></CODE> - if the key for the <var>value</var> parameter, calculated according to this <tt>TabularData</tt> instance's <tt>TabularType</tt> definition already maps to an existing value</DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -