E
- the element typepublic abstract static class SetUtils.SetView<E>
extends java.util.AbstractSet<E>
If the decorated sets change, this view will change as well. The contents
of this view can be transferred to another instance via the copyInto(Set)
and toSet()
methods.
Constructor | Description |
---|---|
SetView() |
Modifier and Type | Method | Description |
---|---|---|
<S extends java.util.Set<E>> |
copyInto(S set) |
Copies the contents of this view into the provided set.
|
protected abstract java.util.Iterator<E> |
createIterator() |
Return an iterator for this view; the returned iterator is
not required to be unmodifiable.
|
java.util.Iterator<E> |
iterator() |
|
int |
size() |
|
java.util.Set<E> |
toSet() |
Returns a new set containing the contents of this view.
|
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
public java.util.Iterator<E> iterator()
iterator
in class java.util.AbstractCollection<E>
protected abstract java.util.Iterator<E> createIterator()
public int size()
size
in class java.util.AbstractCollection<E>
public <S extends java.util.Set<E>> void copyInto(S set)
S
- the set typeset
- the set for copying the contentspublic java.util.Set<E> toSet()
Copyright © 2001-2019 - Apache Software Foundation