TrueUpdate Utilities 0.4

net.java.trueupdate.util
Class HashMaps

java.lang.Object
  extended by net.java.trueupdate.util.HashMaps

@Immutable
public final class HashMaps
extends Object

Provides functions for hash maps.

Author:
Christian Schlichtherle (copied from TrueCommons Shed 2.3.2)

Field Summary
static int OVERHEAD_SIZE
          The number of entries which should be additionally accomodatable by a hash map with a load factor of 75% before resizing it, which is 47.
 
Method Summary
static int initialCapacity(int size)
          Returns the initial capacity for a hash table with a load factor of 75%.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OVERHEAD_SIZE

public static final int OVERHEAD_SIZE
The number of entries which should be additionally accomodatable by a hash map with a load factor of 75% before resizing it, which is 47. When a new hash map gets created, this constant should get used in order to compute the initial capacity or overhead for additional entries.

See Also:
initialCapacity(int), Constant Field Values
Method Detail

initialCapacity

public static int initialCapacity(int size)
Returns the initial capacity for a hash table with a load factor of 75%.

Parameters:
size - the number of entries to accommodate space for.
Returns:
The initial capacity for a hash table with a load factor of 75%.
See Also:
OVERHEAD_SIZE

TrueUpdate Utilities 0.4

Copyright © 2013 Schlichtherle IT Services. All rights reserved.