E
- element type of this setW
- element type of the wrapped setpublic class ConvertedSet<E,W> extends AbstractIterationSet<E>
Constructor and Description |
---|
ConvertedSet(Set<W> set,
Converter<E,W> converter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E obj) |
void |
clear() |
boolean |
contains(Object obj) |
Converter<E,W> |
getConverter()
Get the
Converter associated with this instance. |
Set<W> |
getWrappedSet()
Get the wrapped
Set . |
boolean |
isEmpty()
Overridden in
AbstractIterationSet to minimize the use of AbstractIterationSet.size() . |
Iterator<E> |
iterator() |
boolean |
remove(Object obj) |
int |
size()
Calculate size.
|
Spliterator<E> |
spliterator()
Overridden in
AbstractIterationSet to avoid the use of AbstractIterationSet.size() . |
equals, hashCode, toArray, toArray
removeAll
addAll, containsAll, retainAll, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, containsAll, retainAll
parallelStream, removeIf, stream
public Converter<E,W> getConverter()
Converter
associated with this instance.Converter
public boolean contains(Object obj)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class AbstractCollection<E>
public Spliterator<E> spliterator()
AbstractIterationSet
AbstractIterationSet
to avoid the use of AbstractIterationSet.size()
.spliterator
in interface Iterable<E>
spliterator
in interface Collection<E>
spliterator
in interface Set<E>
spliterator
in class AbstractIterationSet<E>
public boolean add(E obj)
add
in interface Collection<E>
add
in interface Set<E>
add
in class AbstractCollection<E>
public boolean remove(Object obj)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class AbstractCollection<E>
public boolean isEmpty()
AbstractIterationSet
AbstractIterationSet
to minimize the use of AbstractIterationSet.size()
.isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
isEmpty
in class AbstractIterationSet<E>
public int size()
AbstractIterationSet
The implementation in AbstractIterationSet
iterates through all of the elements.
size
in interface Collection<E>
size
in interface Set<E>
size
in class AbstractIterationSet<E>
Copyright © 2022. All rights reserved.