站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

TabularDataSupport (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management.openmbean
Class TabularDataSupport

java.lang.Object
  extended byjavax.management.openmbean.TabularDataSupport
All Implemented Interfaces:
Cloneable, Map, Serializable, TabularData

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

An implementation of TabularData.

Version:
$Revision: 1.4 $
Author:
Adrian Brock, Thomas Diesler.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
TabularDataSupport(TabularType tabularType)
          Construct Tabular Data with an initial capacity of 101 and a load factor of 0.75
TabularDataSupport(TabularType tabularType, int initialCapacity, float loadFactor)
          Construct Tabular Data
 
Method Summary
 Object[] calculateIndex(CompositeData value)
          Calculate the index for the value passed if it were added to the tabular data.
 void clear()
          Removes all CompositeData values from the Tabular Data
 Object clone()
           
 boolean containsKey(Object key)
           
 boolean containsKey(Object[] key)
          Determine whether the tabular data contains the passed value as a row.
 boolean containsValue(CompositeData value)
          Determine whether the tabular data contains the passed value.
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object obj)
          Compares the specified obj parameter with this TabularDataSupport instance for equality.
 Object get(Object key)
           
 CompositeData get(Object[] key)
          Retrieve the composite data for the passed index.
 TabularType getTabularType()
          Retrieve the tabular type for this tabular data
 int hashCode()
          Generates a hashcode for the implementation.
 boolean isEmpty()
          Determine whether the tabular data is empty.
 Set keySet()
          Returns a set view of the index values.
 void put(CompositeData value)
          Add a value to the tabular data.
 Object put(Object key, Object value)
           
 void putAll(CompositeData[] values)
          Add all the passed values.
 void putAll(Map t)
           
 Object remove(Object key)
           
 CompositeData remove(Object[] key)
          Removes the value for the passed and returns the removed value, or null if the key was not present.
 int size()
          Retrieve the number of rows in the tabular data.
 String toString()
          A string representation of the open mbean operation info.
 Collection values()
          Returns a set view of the row values.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TabularDataSupport

public TabularDataSupport(TabularType tabularType)
Construct Tabular Data with an initial capacity of 101 and a load factor of 0.75

Parameters:
tabularType - the tabular type of the data
Throws:
IllegalArgumentException - for a null argument

TabularDataSupport

public TabularDataSupport(TabularType tabularType,
                          int initialCapacity,
                          float loadFactor)
Construct Tabular Data

Parameters:
tabularType - the tabular type of the data
initialCapacity - the initial capacity of the map
loadFactor - the load factory of the map
Throws:
IllegalArgumentException - for a null argument
Method Detail

getTabularType

public TabularType getTabularType()
Description copied from interface: TabularData
Retrieve the tabular type for this tabular data

Specified by:
getTabularType in interface TabularData
Returns:
the tabular type

calculateIndex

public Object[] calculateIndex(CompositeData value)
Description copied from interface: TabularData
Calculate the index for the value passed if it were added to the tabular data. The validity of the passed value is checked. But the tabular data isn't checked to see whether the index is already used.

Specified by:
calculateIndex in interface TabularData
Parameters:
value - the value for which the index is calculated.
Returns:
the calculated index

clear

public void clear()
Description copied from interface: TabularData
Removes all CompositeData values from the Tabular Data

Specified by:
clear in interface Map

containsKey

public boolean containsKey(Object[] key)
Description copied from interface: TabularData
Determine whether the tabular data contains the passed value as a row. If the passed value is null or invalid, false is returned.

Specified by:
containsKey in interface TabularData
Parameters:
key - the value to check
Returns:
true when the value is a row index, false otherwise

containsValue

public boolean containsValue(CompositeData value)
Description copied from interface: TabularData
Determine whether the tabular data contains the passed value. If the passed value is null or invalid, false is returned.

Specified by:
containsValue in interface TabularData
Parameters:
value - the value to check
Returns:
true when the value is a row index, false otherwise

get

public CompositeData get(Object[] key)
Description copied from interface: TabularData
Retrieve the composite data for the passed index.

Specified by:
get in interface TabularData
Parameters:
key - the index to retrieve

isEmpty

public boolean isEmpty()
Description copied from interface: TabularData
Determine whether the tabular data is empty.

Specified by:
isEmpty in interface Map

keySet

public Set keySet()
Description copied from interface: TabularData
Returns a set view of the index values.

Specified by:
keySet in interface Map

put

public void put(CompositeData value)
Description copied from interface: TabularData
Add a value to the tabular data. The value must have the same CompositeType has the tabular data and there is no value already occupying the index for the value.

Specified by:
put in interface TabularData
Parameters:
value - the value to add

putAll

public void putAll(CompositeData[] values)
Description copied from interface: TabularData
Add all the passed values. All the values are checked before addition including any duplicates that might be added. Either all or no value is added.

Specified by:
putAll in interface TabularData
Parameters:
values - the values to add

remove

public CompositeData remove(Object[] key)
Description copied from interface: TabularData
Removes the value for the passed and returns the removed value, or null if the key was not present.

Specified by:
remove in interface TabularData
Parameters:
key - the index of the value to remove

size

public int size()
Description copied from interface: TabularData
Retrieve the number of rows in the tabular data.

Specified by:
size in interface Map

values

public Collection values()
Description copied from interface: TabularData
Returns a set view of the row values.

Specified by:
values in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

clone

public Object clone()

equals

public boolean equals(Object obj)
Compares the specified obj parameter with this TabularDataSupport instance for equality. Returns true if and only if all of the following statements are true: - obj is non null, - obj also implements the TabularData interface, - their tabular types are equal - their contents (ie all CompositeData values) are equal. This ensures that this equals method works properly for obj parameters which are different implementations of the TabularData interface.

Specified by:
equals in interface Map

hashCode

public int hashCode()
Description copied from interface: TabularData
Generates a hashcode for the implementation.

The sum of the hashCodes for the elements mentioned in the equals method

Specified by:
hashCode in interface Map

toString

public String toString()
Description copied from interface: TabularData
A string representation of the open mbean operation info.

It is made up of implementation class and the values mentioned in the equals method

Specified by:
toString in interface TabularData


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.