| 1 |
/////////////////////////////////////////////////////////////////////////////// |
| 2 |
// Copyright (c) 2002, Eric D. Friedman All Rights Reserved. |
| 3 |
// |
| 4 |
// This library is free software; you can redistribute it and/or |
| 5 |
// modify it under the terms of the GNU Lesser General Public |
| 6 |
// License as published by the Free Software Foundation; either |
| 7 |
// version 2.1 of the License, or (at your option) any later version. |
| 8 |
// |
| 9 |
// This library is distributed in the hope that it will be useful, |
| 10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
// GNU General Public License for more details. |
| 13 |
// |
| 14 |
// You should have received a copy of the GNU Lesser General Public |
| 15 |
// License along with this program; if not, write to the Free Software |
| 16 |
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 |
/////////////////////////////////////////////////////////////////////////////// |
| 18 |
// THIS FILE IS AUTOGENERATED, PLEASE DO NOT EDIT OR ELSE |
| 19 |
package gnu.trove; |
| 20 |
|
| 21 |
import java.io.Serializable; |
| 22 |
|
| 23 |
/** |
| 24 |
* Interface to support pluggable hashing strategies in maps and sets. |
| 25 |
* Implementors can use this interface to make the trove hashing |
| 26 |
* algorithms use an optimal strategy when computing hashcodes. |
| 27 |
* |
| 28 |
* Created: Sun Nov 4 08:56:06 2001 |
| 29 |
* |
| 30 |
* @author Eric D. Friedman |
| 31 |
*/ |
| 32 |
public interface T#E#HashingStrategy extends Serializable { |
| 33 |
/** |
| 34 |
* Computes a hash code for the specified #e#. Implementors |
| 35 |
* can use the #e#'s own value or a custom scheme designed to |
| 36 |
* minimize collisions for a known set of input. |
| 37 |
* |
| 38 |
* @param val #e# for which the hashcode is to be computed |
| 39 |
* @return the hashCode |
| 40 |
*/ |
| 41 |
int computeHashCode(#e# val); |
| 42 |
} // T#E#HashingStrategy |