
Tests whether
obj is a value which could be
described by this
CompositeType instance.
If obj is null or is not an instance of
javax.management.openmbean.CompositeData,
isValue returns false.
If obj is an instance of
javax.management.openmbean.CompositeData, then let
ct be its CompositeType as returned by CompositeData.getCompositeType(). The result is true if
this is assignable from ct. This
means that:
this.getTypeName() equals
ct.getTypeName(), and
- there are no item names present in
this that are
not also present in ct, and
- for every item in
this, its type is assignable from
the type of the corresponding item in ct.
A TabularType is assignable from another TabularType if they have the same typeName and index name list, and the
row type of the first is
assignable from the row type of the second.
An ArrayType is assignable from another ArrayType if they have the same dimension; and both are primitive arrays or neither is;
and the element
type of the first is assignable from the element type of the
second.
In every other case, an OpenType is assignable from
another OpenType only if they are equal.
These rules mean that extra items can be added to a CompositeData without making it invalid for a CompositeType
that does not have those items.
Returns:
true if
obj is a value for this
composite type,
false otherwise.
Parameters:
-
obj - the value whose open type is to be tested for compatibility
with this
CompositeType instance.