Package org.javimmutable.collections
Interface IStreamable<T>
- All Superinterfaces:
Iterable<T>
,SplitableIterable<T>
- All Known Subinterfaces:
IArray<T>
,ICollection<T>
,IDeque<T>
,IList<T>
,IListMap<K,
,V> IMap<K,
,V> IMultiset<T>
,ISet<T>
,ISetMap<K,
V>
- All Known Implementing Classes:
AbstractMap
,AbstractMultiset
,AbstractSet
,AbstractSetUsingMap
,ArrayDeque
,EmptyHashMap
,EmptyHashSet
,EntryStreamable
,HashListMap
,HashMap
,HashMultiset
,HashSet
,HashSetMap
,Maybe
,NotNull
,OrderedListMap
,OrderedMap
,OrderedMultiset
,OrderedSet
,OrderedSetMap
,TemplateSetMap
,TransformStreamable
,TreeList
,TreeListMap
,TreeMap
,TreeMultiset
,TreeSet
,TreeSetMap
,TrieArray
Interface for classes that can produce java.util.Streams and are also Iterable. The default stream
creation implementations use spliterator().
-
Method Summary
Modifier and TypeMethodDescriptionint
iterator()
Overridden here to require implementations to return a SplitableIterator rather than a basic Iterator.default java.util.stream.Stream
<T> default Spliterator
<T> Default implementation that creates a Spliterator from a newly created Iterator.default java.util.stream.Stream
<T> stream()
Methods inherited from interface org.javimmutable.collections.SplitableIterable
forEachThrows, indexedForEach, indexedForEachThrows, reduce, reduceThrows
-
Method Details
-
iterator
Overridden here to require implementations to return a SplitableIterator rather than a basic Iterator. This is necessary to allow composition of new objects from methods like keys() and values(). -
getSpliteratorCharacteristics
int getSpliteratorCharacteristics()- Returns:
- characteristics value used when creating Spliterators
-
spliterator
Default implementation that creates a Spliterator from a newly created Iterator.- Specified by:
spliterator
in interfaceIterable<T>
-
stream
-
parallelStream
-