Package org.organicdesign.fp.collections
Interface UnmodSortedSet<E>
-
- All Superinterfaces:
java.util.Collection<E>,java.lang.Iterable<E>,java.util.Set<E>,Sized,java.util.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>, java.util.SortedSet<E>, UnmodSortedCollection<E>
An unmodifiable SortedSet.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default UnmodSortedSet<E>headSet(E toElement)UnmodSortedIterator<E>iterator()Iterates over contents in a guaranteed order.UnmodSortedSet<E>subSet(E fromElement, E toElement)UnmodSortedSet<E>tailSet(E fromElement)-
Methods inherited from interface java.util.Set
add, addAll, clear, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, size, toArray, toArray
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
-
-
-
-
Method Detail
-
headSet
default UnmodSortedSet<E> headSet(E toElement)
- Specified by:
headSetin interfacejava.util.SortedSet<E>
-
iterator
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 interfacejava.util.Collection<E>- Specified by:
iteratorin interfacejava.lang.Iterable<E>- Specified by:
iteratorin interfacejava.util.Set<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
UnmodSortedSet<E> subSet(E fromElement, E toElement)
- Specified by:
subSetin interfacejava.util.SortedSet<E>
-
tailSet
UnmodSortedSet<E> tailSet(E fromElement)
- Specified by:
tailSetin interfacejava.util.SortedSet<E>
-
-