Package com.uwyn.jhighlight.pcj.hash
Class DefaultCharHashFunction
- java.lang.Object
-
- com.uwyn.jhighlight.pcj.hash.DefaultCharHashFunction
-
- All Implemented Interfaces:
CharHashFunction
,java.io.Serializable
public class DefaultCharHashFunction extends java.lang.Object implements CharHashFunction, java.io.Serializable
This class provides a default hash function for char values.- Since:
- 1.0
- Version:
- 1.2 2003/5/3
-
-
Field Summary
Fields Modifier and Type Field Description static CharHashFunction
INSTANCE
Default instance of this hash function.
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultCharHashFunction()
Default constructor to be invoked by sub-classes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
hash(char v)
Returns a hash code for a specified char value.
-
-
-
Field Detail
-
INSTANCE
public static final CharHashFunction INSTANCE
Default instance of this hash function.
-
-
Method Detail
-
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.
-
-