Constructor and Description |
---|
RangeSet(int size) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(int i)
Adds the given int to this set and returns whether the int was present before
|
boolean |
add(Integer integer) |
boolean |
addAll(Collection<? extends Integer> c) |
boolean |
addAll(IntSet set)
Adds all ints from the provided set into this one
|
void |
clear() |
boolean |
contains(int i)
Whether this set contains the given int
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
containsAll(IntSet set)
Whether this set contains all ints in the given IntSet
|
boolean |
equals(Object o) |
int |
hashCode() |
IntStream |
intStream()
A stream of ints representing the data in this set
|
boolean |
isEmpty() |
PrimitiveIterator.OfInt |
iterator()
A primtive iterator that allows iteration over the int values.
|
boolean |
remove(int i)
Removes, if present, the int from the set and returns if it was present or not
|
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(IntSet set)
Removes all ints from this IntSet that are in the provided IntSet
|
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(IntSet c)
Modifies this set to only remove all ints that are not present in the provided IntSet
|
void |
set(int i)
Adds or sets the int without returning whether it was previously set
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
spliterator
parallelStream, removeIf, stream
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public boolean contains(int i)
IntSet
public PrimitiveIterator.OfInt iterator()
IntSet
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(Integer integer)
public boolean remove(Object o)
public boolean remove(int i)
IntSet
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<Integer>
containsAll
in interface Set<Integer>
public boolean containsAll(IntSet set)
IntSet
containsAll
in interface IntSet
set
- the set to check if all are presentpublic boolean add(int i)
IntSet
public void set(int i)
IntSet
public boolean addAll(IntSet set)
IntSet
public boolean addAll(Collection<? extends Integer> c)
public boolean retainAll(Collection<?> c)
public boolean retainAll(IntSet c)
IntSet
public boolean removeAll(IntSet set)
IntSet
public boolean removeAll(Collection<?> c)
public void clear()
public boolean equals(Object o)
public IntStream intStream()
IntSet
public int hashCode()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.