net.sf.mmm.util.text.base
Class SimpleStringHasher
java.lang.Object
net.sf.mmm.util.text.base.AbstractStringHasher
net.sf.mmm.util.text.base.SimpleStringHasher
- All Implemented Interfaces:
- StringHasher
public class SimpleStringHasher
- extends AbstractStringHasher
This is a simple, inefficient implementation of
StringHasher that is compatible to
String.hashCode().
- Since:
- 2.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
|
Method Summary |
int |
getHashCode(char[] string,
int start,
int end)
This method gets the hash-code for the specified
subsequence of the given
string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleStringHasher
public SimpleStringHasher()
- The constructor.
getHashCode
public int getHashCode(char[] string,
int start,
int end)
- This method gets the hash-code for the specified
subsequence of the given
string.
- Parameters:
string - is the char-array containing the
substring to hash.start - is the index of the first character to include into the hash.end - is the index one before the last character to include into the
hash.
- Returns:
- the according hash-code.
- See Also:
Object.hashCode()
Copyright © 2001-2010 mmm-Team. All Rights Reserved.