@NotThreadSafe public static class

ModuleDescriptors.EqualsBuilder

extends Object
java.lang.Object
   ↳ com.atlassian.plugin.descriptors.ModuleDescriptors.EqualsBuilder

Class Overview

Assists in implementing a consistent implementation of equals(Object) methods for module descriptors based on the complete key of the descriptor.

The full specification of the equals(Object obj) contract is defined by equals(Object)

Usage:

  1. If you are using this builder to implement the equals(Object obj) method in a module descriptor implementation:

    new ModuleDescriptors.EqualsBuilder().descriptor(this).isEqualTo(obj);

  2. If you are using this builder to compare descriptors from outside a module descriptor implementation; given two descriptor instances, descriptor1 and descriptor2:

    new ModuleDescriptors.EqualsBuilder().descriptor(descriptor1).isEqualTo(descriptor2);

Summary

Public Constructors
ModuleDescriptors.EqualsBuilder()
Public Methods
ModuleDescriptors.EqualsBuilder descriptor(ModuleDescriptor descriptor)
Sets the module descriptor to create an equals implementation for.
boolean isEqualTo(Object obj)

Returns true if the given object is also a module descriptor and the two descriptors have the same "complete key" as determined by getCompleteKey().

[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ModuleDescriptors.EqualsBuilder ()

Public Methods

public ModuleDescriptors.EqualsBuilder descriptor (ModuleDescriptor descriptor)

Sets the module descriptor to create an equals implementation for.

Parameters
descriptor the module descriptor.
Returns
  • this builder instance.

public boolean isEqualTo (Object obj)

Returns true if the given object is also a module descriptor and the two descriptors have the same "complete key" as determined by getCompleteKey().

Parameters
obj object to be compared for equality with this module descriptor.
Returns
  • true if the specified object is equal to this module descriptor.