Package org.organicdesign.fp.collections
Interface UnmodSortedCollection<E>
-
- All Superinterfaces:
java.util.Collection<E>
,java.lang.Iterable<E>
,Sized
,Transformable<E>
,UnmodCollection<E>
,UnmodIterable<E>
,UnmodSortedIterable<E>
- All Known Subinterfaces:
BaseList<E>
,ImList<E>
,ImSortedSet<E>
,MutableList<E>
,UnmodList<E>
,UnmodSortedSet<E>
- All Known Implementing Classes:
PersistentTreeSet
,PersistentVector
,PersistentVector.MutableVector
,RangeOfInt
,RrbTree
,RrbTree.ImRrbt
,RrbTree.MutableRrbt
,UnmodList.AbstractUnmodList
public interface UnmodSortedCollection<E> extends UnmodCollection<E>, UnmodSortedIterable<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
toImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSet
-
-
-
-
Method Detail
-
iterator
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 interfacejava.util.Collection<E>
- Specified by:
iterator
in interfacejava.lang.Iterable<E>
- Specified by:
iterator
in interfaceUnmodCollection<E>
- Specified by:
iterator
in interfaceUnmodIterable<E>
- Specified by:
iterator
in interfaceUnmodSortedIterable<E>
-
-