T - Component object typepublic final class HashCodeBuilder<T> extends Object implements Builder<Integer>
| Constructor and Description |
|---|
HashCodeBuilder()
Create a new instance, with internal hash initialized to 1, equivalent of
HashCodeBuilder(1). |
HashCodeBuilder(int seedHash)
Create a new instance, with internal hash set to specified seed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(T obj)
Update the internal hash code with the hash code of a component object.
|
@NonNull Integer |
build()
Returns instance of the product.
|
static int |
nextHashCode(int hashCode,
Object obj)
Determine the next hash code combining a base hash code and the hash code of an object.
|
public HashCodeBuilder()
HashCodeBuilder(1).public HashCodeBuilder(int seedHash)
seedHash - Seed hash valuepublic static int nextHashCode(int hashCode,
Object obj)
hashCode - base hash codeobj - Object to be addedpublic void addArgument(T obj)
obj - Component objectpublic @NonNull Integer build()
CheckedBuilderbuild in interface CheckedBuilder<Integer,IllegalArgumentException>Copyright © 2019 OpenDaylight. All rights reserved.