- java.lang.Object
-
- javax.management.openmbean.OpenType<TabularData>
-
- javax.management.openmbean.TabularType
-
- All Implemented Interfaces:
- Serializable
public class TabularType extends OpenType<TabularData>
TheTabularType
class is the open type class whose instances describe the types of
values.TabularData
- Since:
- 1.5
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.management.openmbean.OpenType
ALLOWED_CLASSNAMES, ALLOWED_CLASSNAMES_LIST
-
-
Constructor Summary
Constructors Constructor and Description TabularType(String typeName, String description, CompositeType rowType, String[] indexNames)
Constructs aTabularType
instance, checking for the validity of the given parameters.
-
Method Summary
Methods Modifier and Type Method and Description boolean
equals(Object obj)
Compares the specifiedobj
parameter with thisTabularType
instance for equality.List<String>
getIndexNames()
Returns, in the same order as was given to this instance's constructor, an unmodifiable List of the names of the items the values of which are used to uniquely index each row element of tabular data values described by thisTabularType
instance.CompositeType
getRowType()
Returns the type of the row elements of tabular data values described by thisTabularType
instance.int
hashCode()
Returns the hash code value for thisTabularType
instance.boolean
isValue(Object obj)
Tests whether obj is a value which could be described by thisTabularType
instance.String
toString()
Returns a string representation of thisTabularType
instance.-
Methods inherited from class javax.management.openmbean.OpenType
getClassName, getDescription, getTypeName, isArray
-
-
-
-
Constructor Detail
-
TabularType
public TabularType(String typeName, String description, CompositeType rowType, String[] indexNames) throws OpenDataException
Constructs aTabularType
instance, checking for the validity of the given parameters. The validity constraints are described below for each parameter.The Java class name of tabular data values this tabular type represents (ie the class name returned by the
getClassName
method) is set to the string value returned byTabularData.class.getName()
.- Parameters:
typeName
- The name given to the tabular type this instance represents; cannot be a null or empty string.
description
- The human readable description of the tabular type this instance represents; cannot be a null or empty string.
rowType
- The type of the row elements of tabular data values described by this tabular type instance; cannot be null.
indexNames
- The names of the items the values of which are used to uniquely index each row element in the tabular data values described by this tabular type instance; cannot be null or empty. Each element should be an item name defined in rowType (no null or empty string allowed). It is important to note that the order of the item names in indexNames is used by the methods
andget
of classremove
TabularData
to match their array of values parameter to items.
- Throws:
IllegalArgumentException
- if rowType is null, or indexNames is a null or empty array, or an element in indexNames is a null or empty string, or typeName or description is a null or empty string.
OpenDataException
- if an element's value of indexNames is not an item name defined in rowType.
-
-
Method Detail
-
getRowType
public CompositeType getRowType()
Returns the type of the row elements of tabular data values described by thisTabularType
instance.- Returns:
- the type of each row.
-
getIndexNames
public List<String> getIndexNames()
Returns, in the same order as was given to this instance's constructor, an unmodifiable List of the names of the items the values of which are used to uniquely index each row element of tabular data values described by this
TabularType
instance.- Returns:
- a List of String representing the names of the index items.
-
isValue
public boolean isValue(Object obj)
Tests whether obj is a value which could be described by thisTabularType
instance.If obj is null or is not an instance of
javax.management.openmbean.TabularData
,isValue
returnsfalse
.If obj is an instance of
javax.management.openmbean.TabularData
, saytd
, the result is true if thisTabularType
is assignable fromtd.getTabularType()
, as defined inCompositeType.isValue
.- Specified by:
isValue
in classOpenType<TabularData>
- Parameters:
obj
- the value whose open type is to be tested for compatibility with thisTabularType
instance.- Returns:
true
if obj is a value for this tabular type,false
otherwise.
-
equals
public boolean equals(Object obj)
Compares the specifiedobj
parameter with thisTabularType
instance for equality.Two
TabularType
instances are equal if and only if all of the following statements are true:- their type names are equal
- their row types are equal
- they use the same index names, in the same order
- Specified by:
equals
in classOpenType<TabularData>
- Parameters:
obj
- the object to be compared for equality with thisTabularType
instance; if obj isnull
,equals
returnsfalse
.- Returns:
true
if the specified object is equal to thisTabularType
instance.- See Also:
Object.hashCode()
,HashMap
-
hashCode
public int hashCode()
Returns the hash code value for thisTabularType
instance.The hash code of a
TabularType
instance is the sum of the hash codes of all elements of information used inequals
comparisons (ie: name, row type, index names). This ensures thatt1.equals(t2)
implies thatt1.hashCode()==t2.hashCode()
for any twoTabularType
instancest1
andt2
, as required by the general contract of the methodObject.hashCode()
.As
TabularType
instances are immutable, the hash code for this instance is calculated once, on the first call tohashCode
, and then the same value is returned for subsequent calls.- Specified by:
hashCode
in classOpenType<TabularData>
- Returns:
- the hash code value for this
TabularType
instance - See Also:
Object.equals(java.lang.Object)
,System.identityHashCode(java.lang.Object)
-
toString
public String toString()
Returns a string representation of thisTabularType
instance.The string representation consists of the name of this class (ie
javax.management.openmbean.TabularType
), the type name for this instance, the row type string representation of this instance, and the index names of this instance.As
TabularType
instances are immutable, the string representation for this instance is calculated once, on the first call totoString
, and then the same value is returned for subsequent calls.- Specified by:
toString
in classOpenType<TabularData>
- Returns:
- a string representation of this
TabularType
instance
-
-
Deutsche Übersetzung
Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.
Vielen Dank im Voraus.
Dokument erstellt 11/06/2005, zuletzt geändert 04/03/2020
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-rf-javax/management/openmbean/tabulartype.html
Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.
Referenzen
Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.