Package com.helger.commons.hashcode
Interface IHashCodeGenerator
-
- All Superinterfaces:
IAppendable<IHashCodeGenerator>
- All Known Implementing Classes:
HashCodeGenerator
public interface IHashCodeGenerator extends IAppendable<IHashCodeGenerator>
Base interface for hash code generators.- Author:
- Philip Helger
-
-
Field Summary
Fields Modifier and Type Field Description static intILLEGAL_HASHCODERepresents an illegal hash code that is never to be returned!
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetHashCode()Retrieve the final hash code.
-
-
-
Field Detail
-
ILLEGAL_HASHCODE
static final int ILLEGAL_HASHCODE
Represents an illegal hash code that is never to be returned!- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
-