Class LongHashSet.Synchronized
java.lang.Object
org.greenrobot.essentials.collections.LongHashSet
org.greenrobot.essentials.collections.LongHashSet.Synchronized
- Enclosing class:
LongHashSet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.greenrobot.essentials.collections.LongHashSet
LongHashSet.Entry, LongHashSet.Synchronized
-
Field Summary
Fields inherited from class org.greenrobot.essentials.collections.LongHashSet
DEFAULT_CAPACITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(long key) Adds the given value to the set.void
clear()
boolean
contains
(long key) 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,6void
setCapacity
(int newCapacity) Methods inherited from class org.greenrobot.essentials.collections.LongHashSet
createSynchronized, createSynchronized, setLoadFactor, size
-
Constructor Details
-
Synchronized
public Synchronized(int capacity)
-
-
Method Details
-
contains
public boolean contains(long key) - Overrides:
contains
in classLongHashSet
-
add
public boolean add(long key) Description copied from class:LongHashSet
Adds the given value to the set.- Overrides:
add
in classLongHashSet
- Returns:
- true if the value was actually new
-
remove
public boolean remove(long key) Description copied from class:LongHashSet
Removes the given value to the set.- Overrides:
remove
in classLongHashSet
- Returns:
- true if the value was actually removed
-
keys
public long[] keys()Description copied from class:LongHashSet
Returns all keys in no particular order.- Overrides:
keys
in classLongHashSet
-
clear
public void clear()- Overrides:
clear
in classLongHashSet
-
setCapacity
public void setCapacity(int newCapacity) - Overrides:
setCapacity
in classLongHashSet
-
reserveRoom
public void reserveRoom(int entryCount) Description copied from class:LongHashSet
Target load: 0,6- Overrides:
reserveRoom
in classLongHashSet
-