Package com.uwyn.jhighlight.pcj.hash
Class DefaultCharHashFunction
java.lang.Object
com.uwyn.jhighlight.pcj.hash.DefaultCharHashFunction
- All Implemented Interfaces:
CharHashFunction
,Serializable
This class provides a default hash function for
char values.
- Since:
- 1.0
- Version:
- 1.2 2003/5/3
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CharHashFunction
Default instance of this hash function. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor to be invoked by sub-classes. -
Method Summary
Modifier and TypeMethodDescriptionint
hash
(char v) Returns a hash code for a specified char value.
-
Field Details
-
INSTANCE
Default instance of this hash function.
-
-
Constructor Details
-
DefaultCharHashFunction
protected DefaultCharHashFunction()Default constructor to be invoked by sub-classes.
-
-
Method Details
-
hash
public int hash(char v) Description copied from interface:CharHashFunction
Returns a hash code for a specified char value.- Specified by:
hash
in interfaceCharHashFunction
- Parameters:
v
- the value for which to return a hash code.- Returns:
- a hash code for the specified value.
-