Package com.atlassian.jira.plugin.util
Class ModuleDescriptors.HashCodeBuilder
java.lang.Object
com.atlassian.jira.plugin.util.ModuleDescriptors.HashCodeBuilder
- Enclosing class:
ModuleDescriptors
Assists in implementing
Object.hashCode() methods for module descriptors based on the hashCode
of the descriptor's complete key.-
Constructor Summary
ConstructorsConstructorDescriptionHashCodeBuilder(com.atlassian.plugin.ModuleDescriptor descriptor) Creates an instance of theHashCodeBuilderfor a module descriptor. -
Method Summary
Modifier and TypeMethodDescriptioninthashCode()The computedhashCodefrom toHashCode() is returned due to the likelyhood of bugs in mis-calling toHashCode() and the unlikelyness of it mattering what the hashCode for HashCodeBuilder itself is.intReturn the computedhashCodefor this module descriptor.
-
Constructor Details
-
HashCodeBuilder
public HashCodeBuilder(com.atlassian.plugin.ModuleDescriptor descriptor) Creates an instance of theHashCodeBuilderfor a module descriptor. Must not be null.- Parameters:
descriptor- the module descriptor to create ahashCodeimplementation for.
-
-
Method Details
-
toHashCode
public int toHashCode()Return the computedhashCodefor this module descriptor.- Returns:
hashCodebased on the hashCode of the descriptor's complete key.
-
hashCode
public int hashCode()The computedhashCodefrom toHashCode() is returned due to the likelyhood of bugs in mis-calling toHashCode() and the unlikelyness of it mattering what the hashCode for HashCodeBuilder itself is.
-