Class 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.
      • 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.