Package nl.vpro.util
Class SortedSetElementWrapper<T,S>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<S>
-
- nl.vpro.util.SortedSetElementWrapper<T,S>
-
- All Implemented Interfaces:
Iterable<S>
,Collection<S>
,Set<S>
,SortedSet<S>
- Direct Known Subclasses:
SortedSetSameElementWrapper
public abstract class SortedSetElementWrapper<T,S> extends AbstractSet<S> implements SortedSet<S>
- Since:
- 2.3.1
- Author:
- Michiel Meeuwissen
-
-
Constructor Summary
Constructors Constructor Description SortedSetElementWrapper(SortedSet<T> wrapped)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract S
adapt(T element)
Comparator<? super S>
comparator()
protected T
find(S element)
S
first()
@NonNull SortedSet<S>
headSet(S toElement)
@NonNull Iterator<S>
iterator()
S
last()
int
size()
protected SortedSet<S>
sub(SortedSet<T> wrapped)
@NonNull SortedSet<S>
subSet(S fromElement, S toElement)
@NonNull SortedSet<S>
tailSet(S fromElement)
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
spliterator
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfaceCollection<T>
- Specified by:
size
in interfaceSet<T>
- Specified by:
size
in classAbstractCollection<S>
-
comparator
public Comparator<? super S> comparator()
- Specified by:
comparator
in interfaceSortedSet<T>
-
-