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

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


javax.management.openmbean
Interface TabularData

All Known Implementing Classes:
TabularDataSupport

public interface TabularData

An Open Data Type for tabular data structures.

Version:
$Revision: 1.4 $
Author:
Adrian Brock.
See Also:
TabularDataSupport

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
 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 equals(Object obj)
          Tests whether two tabular data objects are equal
 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.
 void putAll(CompositeData[] values)
          Add all the passed values.
 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.
 

Method Detail

getTabularType

public TabularType getTabularType()
Retrieve the tabular type for this tabular data

Returns:
the tabular type

calculateIndex

public Object[] calculateIndex(CompositeData value)
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.

Parameters:
value - the value for which the index is calculated.
Returns:
the calculated index
Throws:
NullPointerException - for a null value
InvalidOpenTypeException - when the passed value is not valid for the tabular data's row type.

size

public int size()
Retrieve the number of rows in the tabular data.

Returns:
the number of rows.

isEmpty

public boolean isEmpty()
Determine whether the tabular data is empty.

Returns:
true when there are no rows, false otherwise

containsKey

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

Parameters:
key - the value to check
Returns:
true when the value is a row index, false otherwise

containsValue

public boolean containsValue(CompositeData value)
Determine whether the tabular data contains the passed value. If the passed value is null or invalid, false is returned.

Parameters:
value - the value to check
Returns:
true when the value is a row index, false otherwise

get

public CompositeData get(Object[] key)
Retrieve the composite data for the passed index.

Parameters:
key - the index to retrieve
Throws:
NullPointerException - when the passed key is null
InvalidKeyException - when the passed key does match the row type of the tabular data.

put

public void put(CompositeData value)
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.

Parameters:
value - the value to add
Throws:
NullPointerException - when the passed value is null
InvalidOpenTypeException - when the value is not valid for the row type of the tabular data
KeyAlreadyExistsException - when the index for the value is already occupied.

remove

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

Parameters:
key - the index of the value to remove
Throws:
NullPointerException - when the passed key is null
InvalidKeyException - when the key is not valid for the tabular data

putAll

public void putAll(CompositeData[] values)
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.

Parameters:
values - the values to add
Throws:
NullPointerException - when the passed values is null or an element of the values is null
InvalidOpenTypeException - when one of value is not valid for the row type of the tabular data
KeyAlreadyExistsException - when the index for one of the values is already occupied.

clear

public void clear()
Removes all CompositeData values from the Tabular Data


keySet

public Set keySet()
Returns a set view of the index values.

Returns:
the set of index values.

values

public Collection values()
Returns a set view of the row values.

Returns:
the set of row values.

equals

public boolean equals(Object obj)
Tests whether two tabular data objects are equal

The object is non-null
The object implements this interface
The row types are equal
The index to value mappings are equal

Parameters:
obj - the object to test
Returns:
true when the above conditions are satisfied, false otherwise.

hashCode

public int hashCode()
Generates a hashcode for the implementation.

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

Returns:
the calculated hashcode

toString

public String toString()
A string representation of the open mbean operation info.

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

Returns:
the string


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