|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.descriptors.ModuleDescriptors.HashCodeBuilder
@NotThreadSafe public static class ModuleDescriptors.HashCodeBuilder
Assists in implementing Object.hashCode() methods for module descriptors based on the hashCode
of their complete key.
The full specification of the hashCode() contract is defined by
ModuleDescriptor.hashCode()
Usage:
new ModuleDescriptors.HashCodeBuilder().descriptor(this).toHashCode();
new ModuleDescriptors.EqualsBuilder().descriptor(desc).toHashCode();
| Constructor Summary | |
|---|---|
ModuleDescriptors.HashCodeBuilder()
|
|
| Method Summary | |
|---|---|
ModuleDescriptors.HashCodeBuilder |
descriptor(ModuleDescriptor descriptor)
Sets the module descriptor to create a hashCode implementation for. |
int |
hashCode()
The computed hashCode from toHashCode() is returned due to the likelihood
of bugs in mis-calling toHashCode() and the unlikeliness of it mattering what the hashCode for
HashCodeBuilder itself is. |
int |
toHashCode()
Return the computed hashCode for this module descriptor. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModuleDescriptors.HashCodeBuilder()
| Method Detail |
|---|
public ModuleDescriptors.HashCodeBuilder descriptor(ModuleDescriptor descriptor)
hashCode implementation for.
descriptor - the descriptor. Must not be null.
public int toHashCode()
hashCode for this module descriptor.
hashCode based on the hashCode of the complete key of the module descriptor.public int hashCode()
hashCode from toHashCode() is returned due to the likelihood
of bugs in mis-calling toHashCode() and the unlikeliness of it mattering what the hashCode for
HashCodeBuilder itself is.
hashCode in class ObjecthashCode based on the complete key of the module descriptor.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||