PCJ API
Version 1.2

bak.pcj.hash
Class DefaultCharHashFunction

java.lang.Object
  extended bybak.pcj.hash.DefaultCharHashFunction
All Implemented Interfaces:
CharHashFunction, Serializable

public class DefaultCharHashFunction
extends Object
implements CharHashFunction, Serializable

This class provides a default hash function for char values.

Since:
1.0

Field Summary
static CharHashFunction INSTANCE
          Default instance of this hash function.
 
Constructor Summary
protected DefaultCharHashFunction()
          Default constructor to be invoked by sub-classes.
 
Method Summary
 int hash(char v)
          Returns a hash code for a specified char value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final CharHashFunction INSTANCE
Default instance of this hash function.

Constructor Detail

DefaultCharHashFunction

protected DefaultCharHashFunction()
Default constructor to be invoked by sub-classes.

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 interface CharHashFunction
Parameters:
v - the value for which to return a hash code.
Returns:
a hash code for the specified value.

PCJ API
Version 1.2

Report a bug or request a feature.
Further information on the development and latest release of PCJ can be found at the project homepage.

Primitive Collections for Java is released under the GNU Lesser General Public License.
Copyright © 2002, 2003 Søren Bak. All Rights Reserved.

Hosted by SourceForge.net
SourceForge.net Logo