所有类


javax.management.openmbean
类 TabularDataSupport

java.lang.Object
  继承者 javax.management.openmbean.TabularDataSupport
所有已实现的接口:
Serializable, Cloneable, Map, TabularData

public class TabularDataSupport
   
   
   
   
   
extends Object
implements TabularData, Map, Cloneable, Serializable

TabularDataSupport 类是实现 TabularDataMap 接口的开放数据 类,并且它是内部基于哈希映射数据结构的。

从以下版本开始:
1.5
另请参见:
序列化表格

嵌套类摘要
 
从接口 java.util.Map 继承的嵌套类/接口
Map.Entry<K,V>
 
构造方法摘要
TabularDataSupport(TabularType tabularType)
          创建一个空 TabularDataSupport 实例,其开放类型是 tabularType,并且其基础 HashMap 具有默认初始容量 (101) 和默认加载因子 (0.75)。
TabularDataSupport(TabularType tabularType, int initialCapacity, float loadFactor)
          创建一个空 TabularDataSupport 实例,其开放类型为 tabularType,其基础 HashMap 具有指定的初始容量和加载因子。
 
方法摘要
 Object[]calculateIndex(CompositeData value)
          计算将在此 TabularData 实例中使用的索引,以便在指定的复合数据 value 参数添加到此实例后引用该参数。
 voidclear()
          从此 TabularDataSupport 实例中移除所有行。
 Objectclone()
          返回此 TabularDataSupport 实例的一个副本:通过调用 super.clone(),然后克隆此基础映射,即可得到该副本。
 booleancontainsKey(Object key)
          当且仅当此 TabularData 实例包含其索引为指定 keyCompositeData 值(即行)时,才返回 true
 booleancontainsKey(Object[] key)
          当且仅当此 TabularData 实例包含其索引为指定 keyCompositeData 值(即行)时,才返回 true
 booleancontainsValue(CompositeData value)
          当且仅当此 TabularData 实例包含指定的 CompositeData 值时才返回 true
 booleancontainsValue(Object value)
          当且仅当此 TabularData 实例包含指定的值时,才返回 true
 SetentrySet()
          返回此 TabularDataSupport 实例中包含的行映射的索引的 collection 视图。
 booleanequals(Object obj)
          比较指定的 obj 参数与此 TabularDataSupport 实例的相等性。
 Objectget(Object key)
          此方法仅调用 get((Object[]) key)
 CompositeDataget(Object[] key)
          返回此 TabularData 实例中其索引为 keyCompositeData 值,如果没有映射到 key 的值,则返回 null
 TabularTypegetTabularType()
          返回描述此 TabularData 实例的表格类型
 inthashCode()
          返回此 TabularDataSupport 实例的哈希码值。
 booleanisEmpty()
          如果此 TabularDataSupport 实例不包含任何行,则返回 true
 SetkeySet()
          返回包含在此 TabularDataSupport 实例的基础映射中的键的 set 视图,并用于索引行。
 voidput(CompositeData value)
          将 value 添加到此 TabularData 实例。
 Objectput(Object key, Object value)
          此方法仅调用 put((CompositeData) value),因此忽略其可能为 nullkey 参数。
 voidputAll(CompositeData[] values)
          将 values 中的所有元素添加到此 TabularData 实例。
 voidputAll(Map t)
          把包含在指定映射 t 中的所有值添加到此 TabularData 实例。
 Objectremove(Object key)
          此方法仅调用 remove((Object[]) key)
 CompositeDataremove(Object[] key)
          从此 TabularData 实例中移除其索引为 keyCompositeData 值,并返回被移除的值,如果不存在索引为 key 的值,则返回 null
 intsize()
          返回此 TabularDataSupport 实例中的行数。
 StringtoString()
          返回此 TabularDataSupport 实例的字符串表示形式。
 Collectionvalues()
          返回包含在此 TabularDataSupport 实例中的行的 collection 视图。
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

TabularDataSupport

public TabularDataSupport(TabularType tabularType)
创建一个空 TabularDataSupport 实例,其开放类型是 tabularType,并且其基础 HashMap 具有默认初始容量 (101) 和默认加载因子 (0.75)。

此构造方法仅调用 this(tabularType, 101, 0.75f);

参数:
tabularType - 描述此 TabularData 实例的表格类型;不能为 null。
抛出:
IllegalArgumentException - 如果表格类型为 null。

TabularDataSupport

public TabularDataSupport(TabularType tabularType,
                          int initialCapacity,
                          float loadFactor)
创建一个空 TabularDataSupport 实例,其开放类型为 tabularType,其基础 HashMap 具有指定的初始容量和加载因子。

参数:
tabularType - 描述此 TabularData 实例的表格类型;不能为 null。
initialCapacity - HashMap 的初始容量。
loadFactor - HashMap 的加载因子
抛出:
IllegalArgumentException - 如果初始容量小于零或者加载因子为非正数,或者表格类型为 null。
方法详细信息

getTabularType

public TabularType getTabularType()
返回描述此 TabularData 实例的表格类型

指定者:
接口 TabularData 中的 getTabularType
返回:
表格类型。

calculateIndex

public Object[] calculateIndex(CompositeData value)
计算将在此 TabularData 实例中使用的索引,以便在指定的复合数据 value 参数添加到此实例后引用该参数。此方法检查指定 value 的类型有效性,但不检查计算的索引是否已用于引用此 TabularData 实例中的值。

指定者:
接口 TabularData 中的 calculateIndex
参数:
value - 要计算其在此 TabularData 实例中索引的复合数据值;必须是与此实例的行类型相同的复合类型;而且不能为 null。
返回:
TabularData 实例中指定的 value 将具有的索引。
抛出:
NullPointerException - 如果 valuenull
InvalidOpenTypeException - 如果 value 不符合此 TabularData 实例的行类型定义。

containsKey

public boolean containsKey(Object key)
当且仅当此 TabularData 实例包含其索引为指定 keyCompositeData 值(即行)时,才返回 true。如果 key 不能被强制转换成 Object 实例的一维数组,则此方法仅返回 false;否则此方法返回对 this.containsKey((Object[]) key) 调用的结果。

指定者:
接口 Map 中的 containsKey
参数:
key - 将测试其在此 TabularData 实例中的存在性的索引值。
返回:
如果此 TabularData 使用指定的键索引一个行值,则返回 true

containsKey

public boolean containsKey(Object[] key)
当且仅当此 TabularData 实例包含其索引为指定 keyCompositeData 值(即行)时,才返回 true。如果 keynull 或者不符合此 TabularData 实例的 TabularType 定义,则此方法仅返回 false

指定者:
接口 TabularData 中的 containsKey
参数:
key - 将测试其在此 TabularData 实例中的存在性的索引值。
返回:
如果此 TabularData 使用指定的键来索引一个行值,则返回 true

containsValue

public boolean containsValue(CompositeData value)
当且仅当此 TabularData 实例包含指定的 CompositeData 值时才返回 true。如果 valuenull 或者不符合此 TabularData 实例的行类型定义,则此方法仅返回 false

指定者:
接口 TabularData 中的 containsValue
参数:
value - 将测试其在此 TabularData 实例中的存在性的行值。
返回:
如果此 TabularData 实例包含指定的行值,则返回 true

containsValue

public boolean containsValue(Object value)
当且仅当此 TabularData 实例包含指定的值时,才返回 true

指定者:
接口 Map 中的 containsValue
参数:
value - 将测试其在此 TabularData 实例中的存在性的行值。
返回:
如果此 TabularData 实例包含指定的行值,则返回 true