public class AtomicIntSet extends Object
Constructor and Description |
---|
AtomicIntSet() |
AtomicIntSet(int capacity)
Create a new set with the specified capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int value)
Adds the specified value to the set.
|
void |
clear()
Removes all elements in the set.
|
boolean |
contains(int value)
Returns true iff the set contains the specified value.
|
static int |
hash(int value)
From trove
|
int |
size()
Returns the number of elements stored in the set.
|
int[] |
toArray()
Returns the values in the set.
|
public AtomicIntSet()
public AtomicIntSet(int capacity)
capacity
- public boolean contains(int value)
value
- public void add(int value)
value
- public int size()
public int[] toArray()
public static int hash(int value)
value
- public void clear()
Copyright © 2018. All rights reserved.