public class LongHashSet
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
LongHashSet.Synchronized |
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_CAPACITY |
| Constructor and Description |
|---|
LongHashSet() |
LongHashSet(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long key)
Adds the given value to the set.
|
void |
clear() |
boolean |
contains(long key) |
static LongHashSet |
createSynchronized()
Creates a synchronized (thread-safe) LongHashSet.
|
static LongHashSet |
createSynchronized(int capacity)
Creates a synchronized (thread-safe) LongHashSet using the given initial capacity.
|
long[] |
keys()
Returns all keys in no particular order.
|
boolean |
remove(long key)
Removes the given value to the set.
|
void |
reserveRoom(int entryCount)
Target load: 0,6
|
void |
setCapacity(int newCapacity) |
void |
setLoadFactor(float loadFactor) |
int |
size() |
protected static final int DEFAULT_CAPACITY
public static LongHashSet createSynchronized()
public static LongHashSet createSynchronized(int capacity)
public boolean contains(long key)
public boolean add(long key)
public boolean remove(long key)
public long[] keys()
public void clear()
public int size()
public void setCapacity(int newCapacity)
public void setLoadFactor(float loadFactor)
public void reserveRoom(int entryCount)
Available under the Apache License, Version 2.0 - Copyright © 2012-2020 greenrobot.org. All Rights Reserved.