Package org.organicdesign.fp.collections
Interface UnmodSortedSet<E>
-
- All Superinterfaces:
Collection<E>
,Iterable<E>
,Set<E>
,Sized
,SortedSet<E>
,Transformable<E>
,UnmodCollection<E>
,UnmodIterable<E>
,UnmodSet<E>
,UnmodSortedCollection<E>
,UnmodSortedIterable<E>
- All Known Subinterfaces:
ImSortedSet<E>
- All Known Implementing Classes:
PersistentTreeSet
public interface UnmodSortedSet<E> extends UnmodSet<E>, SortedSet<E>, UnmodSortedCollection<E>
An unmodifiable SortedSet.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodIterable
UnmodIterable.UnIterable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull UnmodSortedSet<E>
headSet(E toElement)
@NotNull UnmodSortedIterator<E>
iterator()
Iterates over contents in a guaranteed order.@NotNull UnmodSortedSet<E>
subSet(E fromElement, E toElement)
@NotNull UnmodSortedSet<E>
tailSet(E fromElement)
-
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
-
Methods inherited from interface java.util.Set
add, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface java.util.SortedSet
comparator, first, last, spliterator
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
any, toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutList, toMutMap, toMutRrbt, toMutSet, toMutSortedMap, toMutSortedSet
-
-
-
-
Method Detail
-
headSet
@NotNull default @NotNull UnmodSortedSet<E> headSet(E toElement)
-
iterator
@NotNull @NotNull UnmodSortedIterator<E> iterator()
Iterates over contents in a guaranteed order. Iterates over contents with no guarantees about their ordering. An unmodifiable iterator A one-time use, mutable, not-thread-safe way to get each value of the underling collection in turn. I experimented with various thread-safe alternatives, but the JVM is optimized around iterators so this is the lowest common denominator of collection iteration, even though iterators are inherently mutable.- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in interfaceSet<E>
- Specified by:
iterator
in interfaceUnmodCollection<E>
- Specified by:
iterator
in interfaceUnmodIterable<E>
- Specified by:
iterator
in interfaceUnmodSet<E>
- Specified by:
iterator
in interfaceUnmodSortedCollection<E>
- Specified by:
iterator
in interfaceUnmodSortedIterable<E>
-
subSet
@NotNull @NotNull UnmodSortedSet<E> subSet(E fromElement, E toElement)
-
-