Package org.organicdesign.fp.collections
Interface UnmodSortedCollection<E>
-
- All Superinterfaces:
Collection<E>
,Iterable<E>
,Sized
,Transformable<E>
,UnmodCollection<E>
,UnmodIterable<E>
,UnmodSortedIterable<E>
- All Known Subinterfaces:
BaseList<E>
,ImList<E>
,ImSortedSet<E>
,MutList<E>
,UnmodList<E>
,UnmodSortedSet<E>
- All Known Implementing Classes:
PersistentTreeSet
,PersistentVector
,PersistentVector.MutVector
,RangeOfInt
,RrbTree
,RrbTree.ImRrbt
,RrbTree.MutRrbt
,UnmodList.AbstractUnmodList
public interface UnmodSortedCollection<E> extends UnmodCollection<E>, UnmodSortedIterable<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.organicdesign.fp.collections.UnmodIterable
UnmodIterable.UnIterable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull UnmodSortedIterator<E>
iterator()
An unmodifiable ordered iterator An unmodifiable iterator A one-time use, mutable, not-thread-safe way to get each value of the underling collection in turn.-
Methods inherited from interface java.util.Collection
contains, equals, hashCode, parallelStream, size, spliterator, stream, toArray
-
Methods inherited from interface org.organicdesign.fp.xform.Transformable
any, toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutList, toMutMap, toMutRrbt, toMutSet, toMutSortedMap, toMutSortedSet
-
-
-
-
Method Detail
-
iterator
@NotNull @NotNull UnmodSortedIterator<E> iterator()
An unmodifiable ordered iterator 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 interfaceUnmodCollection<E>
- Specified by:
iterator
in interfaceUnmodIterable<E>
- Specified by:
iterator
in interfaceUnmodSortedIterable<E>
-
-