public class OpenHashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
OpenHashSet.Itr<E> |
| Modifier and Type | Field and Description |
|---|---|
protected Object[] |
data |
protected int |
growThreshold |
protected com.gemstone.gnu.trove.TObjectHashingStrategy |
hashingStrategy |
protected float |
loadFactor |
protected int |
mask |
protected static int |
MAX_CAPACITY |
protected int |
occupied |
protected java.util.function.Function<OpenHashSet<E>,Void> |
postRehashHook |
static Object |
REMOVED |
protected int |
size |
| Constructor and Description |
|---|
OpenHashSet() |
OpenHashSet(int initialCapacity) |
OpenHashSet(int initialCapacity,
float loadFactor) |
OpenHashSet(int initialCapacity,
float loadFactor,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E key) |
Object |
addKey(Object key,
boolean replace,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
int |
capacity() |
protected static int |
checkCapacity(int capacity) |
void |
clear() |
boolean |
contains(Object key) |
protected <K,C,P> Object |
create(K key,
com.gemstone.gemfire.internal.concurrent.MapCallback<K,E,C,P> creator,
C context,
P params,
com.gemstone.gemfire.internal.concurrent.MapResult result,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
protected boolean |
doInsert(Object[] data,
Object key,
int pos) |
protected boolean |
doRemove(Object[] data,
int pos) |
com.gemstone.gnu.trove.TObjectHashingStrategy |
getHashingStrategy() |
Object |
getKey(Object key,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
protected boolean |
handleNewInsert() |
protected boolean |
handleRemove() |
protected int |
index(Object[] data,
Object key,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
protected int |
insertionIndex(Object[] data,
Object key,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
OpenHashSet.Itr<E> |
iterator() |
static int |
keyHash(Object k,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
static int |
nextPowerOf2(int n) |
protected void |
rehash(int newCapacity)
Double the table's size and re-hash everything.
|
boolean |
remove(Object key) |
Object |
removeKey(Object key,
int hash,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy) |
void |
setPostRehashHook(java.util.function.Function<OpenHashSet<E>,Void> hook) |
int |
size() |
equals, hashCode, removeAlladdAll, containsAll, isEmpty, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, isEmpty, removeAll, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static final Object REMOVED
protected static final int MAX_CAPACITY
protected final float loadFactor
protected final com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy
protected int size
protected int occupied
protected int growThreshold
protected int mask
protected Object[] data
protected java.util.function.Function<OpenHashSet<E>,Void> postRehashHook
public OpenHashSet()
public OpenHashSet(int initialCapacity)
public OpenHashSet(int initialCapacity,
float loadFactor)
public OpenHashSet(int initialCapacity,
float loadFactor,
com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
public static int keyHash(Object k, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
protected final int insertionIndex(Object[] data, Object key, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
protected boolean doRemove(Object[] data, int pos)
protected final int index(Object[] data, Object key, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
protected final <K,C,P> Object create(K key, com.gemstone.gemfire.internal.concurrent.MapCallback<K,E,C,P> creator, C context, P params, com.gemstone.gemfire.internal.concurrent.MapResult result, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
public void setPostRehashHook(java.util.function.Function<OpenHashSet<E>,Void> hook)
public final Object addKey(Object key, boolean replace, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
public final Object getKey(Object key, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
public Object removeKey(Object key, int hash, com.gemstone.gnu.trove.TObjectHashingStrategy hashingStrategy)
public boolean contains(Object key)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean add(E key)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean remove(Object key)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public OpenHashSet.Itr<E> iterator()
public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public final int capacity()
public final com.gemstone.gnu.trove.TObjectHashingStrategy getHashingStrategy()
public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>protected final boolean handleNewInsert()
protected final boolean handleRemove()
protected final void rehash(int newCapacity)
protected static int checkCapacity(int capacity)
public static int nextPowerOf2(int n)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.