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:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin interfaceSet<E>- Specified by:
iteratorin interfaceUnmodCollection<E>- Specified by:
iteratorin interfaceUnmodIterable<E>- Specified by:
iteratorin interfaceUnmodSet<E>- Specified by:
iteratorin interfaceUnmodSortedCollection<E>- Specified by:
iteratorin interfaceUnmodSortedIterable<E>
-
subSet
@NotNull @NotNull UnmodSortedSet<E> subSet(E fromElement, E toElement)
-
-