org.apache.cocoon.util
Class HashUtil

java.lang.Object
  extended byorg.apache.cocoon.util.HashUtil

public final class HashUtil
extends Object

A very efficient java hash algorithm, based on the BuzHash algoritm by Robert Uzgalis (see http://www.serve.net/buz/hash.adt/java.000.html for more information). BuzHash is Copyright (c)1996 Robert Uzgalis, All Rights Reserved. Used with kind permission of the author

Version:
$Id: HashUtil.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
HashUtil()
           
 
Method Summary
static long hash(String arg)
          Hash a String.
static long hash(StringBuffer arg)
          Hash a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashUtil

public HashUtil()
Method Detail

hash

public static long hash(String arg)
Hash a String.

Parameters:
arg - The String to be hashed
Returns:
The hash for the input.

hash

public static long hash(StringBuffer arg)
Hash a String.

Parameters:
arg - The String represented by the StringBuffer to be hashed
Returns:
The hash for the input.


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.