public class RtArraySet<D> extends AbstractSet<D>
hasNext()==false
" has returned, all following behaviour
is unspecified and further usage forbidden. (The Iterator object will be recycled.)Constructor and Description |
---|
RtArraySet(int capacity) |
RtArraySet(int capacity,
int iterators) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(D obj) |
D |
any()
Get one arbitrarily chosen element and remove it.
|
int |
capacity() |
void |
clear() |
void |
forEach(Consumer<? super D> acc)
Apply code to all elements.
|
Iterator<D> |
iterator() |
boolean |
remove(Object obj) |
int |
size() |
equals, hashCode, removeAll
addAll, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public RtArraySet(int capacity)
public RtArraySet(int capacity, int iterators)
public boolean add(D obj)
add
in interface Collection<D>
add
in interface Set<D>
add
in class AbstractCollection<D>
public int capacity()
public int size()
size
in interface Collection<D>
size
in interface Set<D>
size
in class AbstractCollection<D>
public void clear()
clear
in interface Collection<D>
clear
in interface Set<D>
clear
in class AbstractCollection<D>
public boolean remove(Object obj)
remove
in interface Collection<D>
remove
in interface Set<D>
remove
in class AbstractCollection<D>
@Opt public D any()
see also the complete user documentation .