Search in sources :

Example 1 with DescriptorRead

use of javax.management.DescriptorRead in project jdk8u_jdk by JetBrains.

the class OpenMBeanAttributeInfoSupport method equal.

static boolean equal(OpenMBeanParameterInfo x1, OpenMBeanParameterInfo x2) {
    if (x1 instanceof DescriptorRead) {
        if (!(x2 instanceof DescriptorRead))
            return false;
        Descriptor d1 = ((DescriptorRead) x1).getDescriptor();
        Descriptor d2 = ((DescriptorRead) x2).getDescriptor();
        if (!d1.equals(d2))
            return false;
    } else if (x2 instanceof DescriptorRead)
        return false;
    return x1.getName().equals(x2.getName()) && x1.getOpenType().equals(x2.getOpenType()) && (x1.hasDefaultValue() ? x1.getDefaultValue().equals(x2.getDefaultValue()) : !x2.hasDefaultValue()) && (x1.hasMinValue() ? x1.getMinValue().equals(x2.getMinValue()) : !x2.hasMinValue()) && (x1.hasMaxValue() ? x1.getMaxValue().equals(x2.getMaxValue()) : !x2.hasMaxValue()) && (x1.hasLegalValues() ? x1.getLegalValues().equals(x2.getLegalValues()) : !x2.hasLegalValues());
}
Also used : DescriptorRead(javax.management.DescriptorRead) Descriptor(javax.management.Descriptor) ImmutableDescriptor(javax.management.ImmutableDescriptor)

Aggregations

Descriptor (javax.management.Descriptor)1 DescriptorRead (javax.management.DescriptorRead)1 ImmutableDescriptor (javax.management.ImmutableDescriptor)1