|
What this is
Other links
The source code
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2001, Eric D. Friedman All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
///////////////////////////////////////////////////////////////////////////////
package gnu.trove;
/**
* The base class for hashtables of primitive values. Since there is
* no notion of object equality for primitives, it isn't possible to
* use a `REMOVED' object to track deletions in an open-addressed table.
* So, we have to resort to using a parallel `bookkeeping' array of bytes,
* in which flags can be set to indicate that a particular slot in the
* hash table is FREE, FULL, or REMOVED.
*
* Created: Fri Jan 11 18:55:16 2002
*
* @author Eric D. Friedman
* @version $Id: TPrimitiveHash.java,v 1.3 2002/09/20 20:55:58 ericdf Exp $
*/
abstract public class TPrimitiveHash extends THash {
/** flags indicating whether each position in the hash is
* FREE, FULL, or REMOVED */
protected transient byte[] _states;
/* constants used for state flags */
/** flag indicating that a slot in the hashtable is available */
protected static final byte FREE = 0;
/** flag indicating that a slot in the hashtable is occupied */
protected static final byte FULL = 1;
/** flag indicating that the value of a slot in the hashtable
* was deleted */
protected static final byte REMOVED = 2;
/**
* Creates a new
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.