1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2002, Eric D. Friedman All Rights Reserved.
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.
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.
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 ///////////////////////////////////////////////////////////////////////////////
21 import java.io.Serializable;
23 //////////////////////////////////////////////////
24 // THIS IS A GENERATED CLASS. DO NOT HAND EDIT! //
25 //////////////////////////////////////////////////
29 * Interface to support pluggable hashing strategies in maps and sets.
30 * Implementors can use this interface to make the trove hashing
31 * algorithms use an optimal strategy when computing hashcodes.
33 * Created: Sun Nov 4 08:56:06 2001
35 * @author Eric D. Friedman
36 * @version $Id: PHashingStrategy.template,v 1.1 2006/11/10 23:28:00 robeden Exp $
39 public interface TIntHashingStrategy extends Serializable {
41 * Computes a hash code for the specified int. Implementors
42 * can use the int's own value or a custom scheme designed to
43 * minimize collisions for a known set of input.
45 * @param val int for which the hashcode is to be computed
46 * @return the hashCode
48 public int computeHashCode(int val);
49 } // TIntHashingStrategy