Constructor and Description |
---|
SmallIntSet() |
SmallIntSet(int initialRange)
Create a new
IntSet and pre-allocate space for elements 0..initialRange-1 . |
SmallIntSet(Set<Integer> set) |
SmallIntSet(SmallIntSet other) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int i)
Add an integer to the set without boxing the parameter.
|
boolean |
add(Integer i) |
boolean |
addAll(Collection<? extends Integer> c) |
int |
capacity() |
void |
clear() |
boolean |
contains(int i)
Check if the set contains an integer without boxing the parameter.
|
boolean |
contains(Integer o) |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isEmpty() |
PrimitiveIterator.OfInt |
iterator() |
static SmallIntSet |
of(int... elements) |
static SmallIntSet |
of(int i1) |
static SmallIntSet |
of(int i1,
int i2) |
static SmallIntSet |
of(int i1,
int i2,
int i3) |
static SmallIntSet |
readFrom(ObjectInput input) |
boolean |
remove(int i)
Remove an integer from the set without boxing.
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
void |
set(int i)
Add an integer to the set without boxing the parameter or checking if the integer was already present in the set.
|
void |
set(int i,
boolean value)
If
value is true , add the integer to the set, otherwise remove the integer from the set. |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
static void |
writeTo(ObjectOutput output,
SmallIntSet set) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
public SmallIntSet()
public SmallIntSet(int initialRange)
IntSet
and pre-allocate space for elements 0..initialRange-1
.public SmallIntSet(SmallIntSet other)
public static SmallIntSet of(int i1)
public static SmallIntSet of(int i1, int i2)
public static SmallIntSet of(int i1, int i2, int i3)
public static SmallIntSet of(int... elements)
public int size()
public int capacity()
public boolean isEmpty()
public boolean contains(Object o)
public boolean contains(Integer o)
public boolean contains(int i)
public PrimitiveIterator.OfInt iterator()
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(Integer i)
public boolean add(int i)
public void set(int i)
public void set(int i, boolean value)
value
is true
, add the integer to the set, otherwise remove the integer from the set.public boolean remove(Object o)
public boolean remove(int i)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<Integer>
containsAll
in interface Set<Integer>
public boolean addAll(Collection<? extends Integer> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public boolean equals(Object o)
public int hashCode()
public static void writeTo(ObjectOutput output, SmallIntSet set) throws IOException
IOException
public static SmallIntSet readFrom(ObjectInput input) throws IOException
IOException
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.