Class SetUtils.SetView<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
org.apache.commons.collections4.SetUtils.SetView<E>
- Type Parameters:
- E- the element type
- All Implemented Interfaces:
- Iterable<E>,- Collection<E>,- Set<E>
- Enclosing class:
- SetUtils
An unmodifiable view of a set that may be backed by other sets.
 
 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.
 
- Since:
- 4.1
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.util.AbstractSetequals, hashCode, removeAllMethods inherited from class java.util.AbstractCollectionadd, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream
- 
Constructor Details- 
SetViewpublic SetView()Constructs a new instance.
 
- 
- 
Method Details- 
copyInto
- 
createIteratorReturn an iterator for this view; the returned iterator is not required to be unmodifiable.- Returns:
- a new iterator for this view
 
- 
iterator
- 
size- Specified by:
- sizein interface- Collection<E>
- Specified by:
- sizein interface- Set<E>
- Specified by:
- sizein class- AbstractCollection<E>
 
- 
toSet
 
-