Package com.helger.commons.hashcode
Interface IHashCodeGenerator
- All Superinterfaces:
IAppendable<IHashCodeGenerator>
- All Known Implementing Classes:
HashCodeGenerator
Base interface for hash code generators.
- Author:
- Philip Helger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intRepresents an illegal hash code that is never to be returned! -
Method Summary
-
Field Details
-
ILLEGAL_HASHCODE
static final int ILLEGAL_HASHCODERepresents an illegal hash code that is never to be returned!- See Also:
-
-
Method Details
-
getHashCode
int getHashCode()Retrieve the final hash code. Once this method has been called, no further calls to append can be done since the hash value is locked!- Returns:
- The finally completed hash code. The returned value is never
ILLEGAL_HASHCODE. If the calculated hash code would beILLEGAL_HASHCODEit is changed to -1 instead.
-