Package | Description |
---|---|
javaslang | |
javaslang.collection |
Purely functional collections based on Traversable.
|
javaslang.concurrent |
This package contains basic building blocks creating fast, asynchronous, non-blocking parallel code.
|
javaslang.control |
Modifier and Type | Method and Description |
---|---|
static <T,U> Iterator<U> |
API.For(Iterable<T> ts,
Function<? super T,? extends Iterable<U>> f)
A shortcut for
Iterator.ofAll(ts).flatMap(f) which allows us to write real for-comprehensions using
For(...).yield(...) . |
Iterator<T> |
Value.iterator()
Returns a rich
javaslang.collection.Iterator . |
Iterator<T> |
Lazy.iterator() |
Iterator<T1> |
API.For1.yield()
A shortcut for
yield(Function.identity()) . |
<R> Iterator<R> |
API.For2.yield(BiFunction<? super T1,? super T2,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For1.yield(Function<? super T1,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For3.yield(Function3<? super T1,? super T2,? super T3,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For4.yield(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For5.yield(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For6.yield(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For7.yield(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
<R> Iterator<R> |
API.For8.yield(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
Yields a result for elements of the cross product of the underlying Iterables.
|
Modifier and Type | Field and Description |
---|---|
static Iterator<Object> |
Iterator.EMPTY
The empty Iterator.
|
Modifier and Type | Method and Description |
---|---|
static <T> Iterator<T> |
Iterator.concat(Iterable<? extends Iterable<? extends T>> iterables)
Creates an Iterator which traverses along the concatenation of the given iterables.
|
static <T> Iterator<T> |
Iterator.concat(Iterable<? extends T>... iterables)
Creates an Iterator which traverses along the concatenation of the given iterables.
|
default Iterator<T> |
Iterator.concat(Iterator<? extends T> that) |
static <T> Iterator<T> |
Iterator.continually(Supplier<? extends T> supplier)
Generates an infinite iterator using a value Supplier.
|
static <T> Iterator<T> |
Iterator.continually(T t)
Creates an infinite iterator returning the given element.
|
default Iterator<Tuple2<T,T>> |
Seq.crossProduct()
Calculates the cross product (, i.e.
|
Iterator<Vector<T>> |
Vector.crossProduct(int power) |
default Iterator<Stream<T>> |
Stream.crossProduct(int power) |
Iterator<? extends Seq<T>> |
Seq.crossProduct(int power)
Calculates the n-ary cartesian power (or cross product or simply product) of this.
|
Iterator<Queue<T>> |
Queue.crossProduct(int power) |
default Iterator<List<T>> |
List.crossProduct(int power) |
Iterator<? extends LinearSeq<T>> |
LinearSeq.crossProduct(int power) |
Iterator<? extends IndexedSeq<T>> |
IndexedSeq.crossProduct(int power) |
Iterator<CharSeq> |
CharSeq.crossProduct(int power) |
Iterator<Array<T>> |
Array.crossProduct(int power) |
default <U> Iterator<Tuple2<T,U>> |
Seq.crossProduct(Iterable<? extends U> that)
Calculates the cross product
this x that . |
default Iterator<T> |
Iterator.distinct() |
default Iterator<T> |
Iterator.distinctBy(Comparator<? super T> comparator) |
default <U> Iterator<T> |
Iterator.distinctBy(Function<? super T,? extends U> keyExtractor) |
default Iterator<T> |
Iterator.drop(int n)
Removes up to n elements from this iterator.
|
default Iterator<T> |
Iterator.dropRight(int n) |
default Iterator<T> |
Iterator.dropUntil(Predicate<? super T> predicate) |
default Iterator<T> |
Iterator.dropWhile(Predicate<? super T> predicate) |
static <T> Iterator<T> |
Iterator.empty()
Returns the empty Iterator.
|
static <T> Iterator<T> |
Iterator.fill(int n,
Supplier<? extends T> s)
Returns an Iterator on a sequence of
n values supplied by a given Supplier s . |
default Iterator<T> |
Iterator.filter(Predicate<? super T> predicate)
Returns an Iterator that contains elements that satisfy the given
predicate . |
default <U> Iterator<U> |
Iterator.flatMap(Function<? super T,? extends Iterable<? extends U>> mapper)
FlatMaps the elements of this Iterator to Iterables, which are iterated in the order of occurrence.
|
static Iterator<Integer> |
Iterator.from(int value)
Returns an infinite iterator of int values starting from
value . |
static Iterator<Integer> |
Iterator.from(int value,
int step)
Returns an infinite iterator of int values starting from
value and spaced by step . |
static Iterator<Long> |
Iterator.from(long value)
Returns an infinite iterator of long values starting from
value . |
static Iterator<Long> |
Iterator.from(long value,
long step)
Returns an infinite iterator of long values starting from
value and spaced by step . |
Iterator<Vector<T>> |
Vector.grouped(int size) |
Iterator<TreeSet<T>> |
TreeSet.grouped(int size) |
Iterator<TreeMap<K,V>> |
TreeMap.grouped(int size) |
default Iterator<Seq<T>> |
Tree.grouped(int size) |
Iterator<? extends Traversable<T>> |
Traversable.grouped(int size)
Groups this
Traversable into fixed size blocks. |
default Iterator<Stream<T>> |
Stream.grouped(int size) |
Iterator<? extends SortedSet<T>> |
SortedSet.grouped(int size) |
Iterator<? extends SortedMap<K,V>> |
SortedMap.grouped(int size) |
Iterator<? extends Set<T>> |
Set.grouped(int size) |
Iterator<? extends Seq<T>> |
Seq.grouped(int size) |
Iterator<Queue<T>> |
Queue.grouped(int size) |
Iterator<? extends PriorityQueue<T>> |
PriorityQueue.grouped(int size) |
Iterator<? extends Multimap<K,V>> |
Multimap.grouped(int size) |
Iterator<? extends Map<K,V>> |
Map.grouped(int size) |
default Iterator<List<T>> |
List.grouped(int size) |
Iterator<LinkedHashSet<T>> |
LinkedHashSet.grouped(int size) |
Iterator<LinkedHashMap<K,V>> |
LinkedHashMap.grouped(int size) |
Iterator<? extends LinearSeq<T>> |
LinearSeq.grouped(int size) |
default Iterator<Seq<T>> |
Iterator.grouped(int size) |
Iterator<? extends IndexedSeq<T>> |
IndexedSeq.grouped(int size) |
Iterator<HashSet<T>> |
HashSet.grouped(int size) |
Iterator<HashMap<K,V>> |
HashMap.grouped(int size) |
Iterator<CharSeq> |
CharSeq.grouped(int size) |
default Iterator<BitSet<T>> |
BitSet.grouped(int size) |
Iterator<Array<T>> |
Array.grouped(int size) |
default Iterator<T> |
Iterator.init() |
default Iterator<T> |
Iterator.intersperse(T element)
Inserts an element between all elements of this Iterator.
|
static <T> Iterator<T> |
Iterator.iterate(T seed,
Function<? super T,? extends T> f)
Generates an infinite iterator using a function to calculate the next value
based on the previous.
|
Iterator<T> |
Vector.iterator() |
Iterator<T> |
TreeSet.iterator() |
Iterator<Tuple2<K,V>> |
TreeMap.iterator() |
default Iterator<T> |
Tree.iterator() |
default Iterator<T> |
Traversable.iterator()
An iterator by means of head() and tail().
|
Iterator<T> |
Stream.Empty.iterator() |
Iterator<T> |
Stream.Cons.iterator() |
Iterator<T> |
Set.iterator() |
Iterator<Tuple2<K,V>> |
Multimap.iterator() |
Iterator<Tuple2<K,V>> |
Map.iterator() |
Iterator<T> |
LinkedHashSet.iterator() |
Iterator<Tuple2<K,V>> |
LinkedHashMap.iterator() |
default Iterator<T> |
Iterator.iterator() |
Iterator<T> |
HashSet.iterator() |
Iterator<Tuple2<K,V>> |
HashMap.iterator() |
Iterator<Character> |
CharSeq.iterator() |
Iterator<T> |
Array.iterator() |
default Iterator<T> |
Seq.iterator(int index)
Returns an iterator of this elements starting at the given index.
|
default Iterator<T> |
Tree.iterator(Tree.Order order)
Traverses this tree values in a specific
Tree.Order . |
default <U> Iterator<U> |
Iterator.map(Function<? super T,? extends U> mapper)
Maps the elements of this Iterator lazily using the given
mapper . |
static <T> Iterator<T> |
Iterator.narrow(Iterator<? extends T> iterator)
Narrows a widened
Iterator<? extends T> to Iterator<T>
by performing a type-safe cast. |
static <T> Iterator<T> |
Iterator.of(T... elements)
Creates an Iterator which traverses the given elements.
|
static <T> Iterator<T> |
Iterator.of(T element)
Creates an Iterator which traverses one element.
|
static Iterator<Boolean> |
Iterator.ofAll(boolean[] array)
Creates an Iterator based on the elements of a boolean array.
|
static Iterator<Byte> |
Iterator.ofAll(byte[] array)
Creates an Iterator based on the elements of a byte array.
|
static Iterator<Character> |
Iterator.ofAll(char[] array)
Creates an Iterator based on the elements of a char array.
|
static Iterator<Double> |
Iterator.ofAll(double[] array)
Creates ann Iterator based on the elements of a double array.
|
static Iterator<Float> |
Iterator.ofAll(float[] array)
Creates an Iterator based on the elements of a float array.
|
static Iterator<Integer> |
Iterator.ofAll(int[] array)
Creates an Iterator based on the elements of an int array.
|
static <T> Iterator<T> |
Iterator.ofAll(Iterable<? extends T> iterable)
Creates an Iterator based on the given Iterable.
|
static <T> Iterator<T> |
Iterator.ofAll(Iterator<? extends T> iterator)
Creates an Iterator based on the given Iterator by
delegating calls of
hasNext() and next() to it. |
static Iterator<Long> |
Iterator.ofAll(long[] array)
Creates an Iterator based on the elements of a long array.
|
static Iterator<Short> |
Iterator.ofAll(short[] array)
Creates an Iterator based on the elements of a short array.
|
default Iterator<T> |
Iterator.peek(Consumer<? super T> action) |
static Iterator<Character> |
Iterator.range(char from,
char toExclusive)
Creates an Iterator of characters starting from
from , extending to toExclusive - 1 . |
static Iterator<Integer> |
Iterator.range(int from,
int toExclusive)
Creates an Iterator of int numbers starting from
from , extending to toExclusive - 1 . |
static Iterator<Long> |
Iterator.range(long from,
long toExclusive)
Creates an Iterator of long numbers starting from
from , extending to toExclusive - 1 . |
static Iterator<BigDecimal> |
Iterator.rangeBy(BigDecimal from,
BigDecimal toExclusive,
BigDecimal step) |
static Iterator<Character> |
Iterator.rangeBy(char from,
char toExclusive,
int step)
Creates an Iterator of characters starting from
from , extending to toExclusive - 1 ,
with step . |
static Iterator<Double> |
Iterator.rangeBy(double from,
double toExclusive,
double step) |
static Iterator<Integer> |
Iterator.rangeBy(int from,
int toExclusive,
int step)
Creates an Iterator of int numbers starting from
from , extending to toExclusive - 1 ,
with step . |
static Iterator<Long> |
Iterator.rangeBy(long from,
long toExclusive,
long step)
Creates an Iterator of long numbers starting from
from , extending to toExclusive - 1 ,
with step . |
static Iterator<Character> |
Iterator.rangeClosed(char from,
char toInclusive)
Creates an Iterator of characters starting from
from , extending to toInclusive . |
static Iterator<Integer> |
Iterator.rangeClosed(int from,
int toInclusive)
Creates an Iterator of int numbers starting from
from , extending to toInclusive . |
static Iterator<Long> |
Iterator.rangeClosed(long from,
long toInclusive)
Creates an Iterator of long numbers starting from
from , extending to toInclusive . |
static Iterator<Character> |
Iterator.rangeClosedBy(char from,
char toInclusive,
int step)
Creates an Iterator of characters starting from
from , extending to toInclusive ,
with step . |
static Iterator<Double> |
Iterator.rangeClosedBy(double from,
double toInclusive,
double step) |
static Iterator<Integer> |
Iterator.rangeClosedBy(int from,
int toInclusive,
int step)
Creates an Iterator of int numbers starting from
from , extending to toInclusive ,
with step . |
static Iterator<Long> |
Iterator.rangeClosedBy(long from,
long toInclusive,
long step)
Creates an Iterator of long numbers starting from
from , extending to toInclusive ,
with step . |
default Iterator<T> |
Iterator.replace(T currentElement,
T newElement) |
default Iterator<T> |
Iterator.replaceAll(T currentElement,
T newElement) |
default Iterator<T> |
Iterator.retainAll(Iterable<? extends T> elements) |
Iterator<T> |
Seq.reverseIterator()
An iterator yielding elements in reversed order.
|
default Iterator<T> |
LinearSeq.reverseIterator() |
default Iterator<T> |
IndexedSeq.reverseIterator() |
default <U> Iterator<U> |
Iterator.scanLeft(U zero,
BiFunction<? super U,? super T,? extends U> operation) |
default <U> Iterator<U> |
Iterator.scanRight(U zero,
BiFunction<? super T,? super U,? extends U> operation) |
Iterator<Vector<T>> |
Vector.sliding(int size) |
Iterator<TreeSet<T>> |
TreeSet.sliding(int size) |
Iterator<TreeMap<K,V>> |
TreeMap.sliding(int size) |
default Iterator<Seq<T>> |
Tree.sliding(int size) |
Iterator<? extends Traversable<T>> |
Traversable.sliding(int size)
Slides a window of a specific
size and step size 1 over this Traversable by calling
Traversable.sliding(int, int) . |
default Iterator<Stream<T>> |
Stream.sliding(int size) |
Iterator<? extends SortedSet<T>> |
SortedSet.sliding(int size) |
Iterator<? extends SortedMap<K,V>> |
SortedMap.sliding(int size) |
Iterator<? extends Set<T>> |
Set.sliding(int size) |
Iterator<? extends Seq<T>> |
Seq.sliding(int size) |
Iterator<Queue<T>> |
Queue.sliding(int size) |
Iterator<? extends PriorityQueue<T>> |
PriorityQueue.sliding(int size) |
Iterator<? extends Multimap<K,V>> |
Multimap.sliding(int size) |
Iterator<? extends Map<K,V>> |
Map.sliding(int size) |
default Iterator<List<T>> |
List.sliding(int size) |
Iterator<LinkedHashSet<T>> |
LinkedHashSet.sliding(int size) |
Iterator<LinkedHashMap<K,V>> |
LinkedHashMap.sliding(int size) |
Iterator<? extends LinearSeq<T>> |
LinearSeq.sliding(int size) |
default Iterator<Seq<T>> |
Iterator.sliding(int size) |
Iterator<? extends IndexedSeq<T>> |
IndexedSeq.sliding(int size) |
Iterator<HashSet<T>> |
HashSet.sliding(int size) |
Iterator<HashMap<K,V>> |
HashMap.sliding(int size) |
Iterator<CharSeq> |
CharSeq.sliding(int size) |
default Iterator<BitSet<T>> |
BitSet.sliding(int size) |
Iterator<Array<T>> |
Array.sliding(int size) |
Iterator<Vector<T>> |
Vector.sliding(int size,
int step) |
Iterator<TreeSet<T>> |
TreeSet.sliding(int size,
int step) |
Iterator<TreeMap<K,V>> |
TreeMap.sliding(int size,
int step) |
default Iterator<Seq<T>> |
Tree.sliding(int size,
int step) |
Iterator<? extends Traversable<T>> |
Traversable.sliding(int size,
int step)
Slides a window of a specific
size and step size over this Traversable . |
default Iterator<Stream<T>> |
Stream.sliding(int size,
int step) |
Iterator<? extends SortedSet<T>> |
SortedSet.sliding(int size,
int step) |
Iterator<? extends SortedMap<K,V>> |
SortedMap.sliding(int size,
int step) |
Iterator<? extends Set<T>> |
Set.sliding(int size,
int step) |
Iterator<? extends Seq<T>> |
Seq.sliding(int size,
int step) |
Iterator<Queue<T>> |
Queue.sliding(int size,
int step) |
Iterator<? extends PriorityQueue<T>> |
PriorityQueue.sliding(int size,
int step) |
Iterator<? extends Multimap<K,V>> |
Multimap.sliding(int size,
int step) |
Iterator<? extends Map<K,V>> |
Map.sliding(int size,
int step) |
default Iterator<List<T>> |
List.sliding(int size,
int step) |
Iterator<LinkedHashSet<T>> |
LinkedHashSet.sliding(int size,
int step) |
Iterator<LinkedHashMap<K,V>> |
LinkedHashMap.sliding(int size,
int step) |
Iterator<? extends LinearSeq<T>> |
LinearSeq.sliding(int size,
int step) |
default Iterator<Seq<T>> |
Iterator.sliding(int size,
int step) |
Iterator<? extends IndexedSeq<T>> |
IndexedSeq.sliding(int size,
int step) |
Iterator<HashSet<T>> |
HashSet.sliding(int size,
int step) |
Iterator<HashMap<K,V>> |
HashMap.sliding(int size,
int step) |
Iterator<CharSeq> |
CharSeq.sliding(int size,
int step) |
Iterator<BitSet<T>> |
BitSet.sliding(int size,
int step) |
Iterator<Array<T>> |
Array.sliding(int size,
int step) |
static <T> Iterator<T> |
Iterator.tabulate(int n,
Function<? super Integer,? extends T> f)
Returns an Iterator on a sequence of
n values of a given Function f
over a range of integer values from 0 to n - 1 . |
default Iterator<T> |
Iterator.tail() |
default Iterator<T> |
Iterator.take(int n)
Take the first n elements from this iterator.
|
default Iterator<T> |
Iterator.takeRight(int n) |
default Iterator<T> |
Iterator.takeUntil(Predicate<? super T> predicate) |
default Iterator<T> |
Iterator.takeWhile(Predicate<? super T> predicate) |
static <T> Iterator<T> |
Iterator.unfold(T seed,
Function<? super T,Option<Tuple2<? extends T,? extends T>>> f)
Creates an iterator from a seed value and a function.
|
static <T,U> Iterator<U> |
Iterator.unfoldLeft(T seed,
Function<? super T,Option<Tuple2<? extends T,? extends U>>> f)
Creates an iterator from a seed value and a function.
|
static <T,U> Iterator<U> |
Iterator.unfoldRight(T seed,
Function<? super T,Option<Tuple2<? extends U,? extends T>>> f)
Creates an iterator from a seed value and a function.
|
default <U> Iterator<Tuple2<T,U>> |
Iterator.zip(Iterable<? extends U> that) |
default <U> Iterator<Tuple2<T,U>> |
Iterator.zipAll(Iterable<? extends U> that,
T thisElem,
U thatElem) |
default <U,R> Iterator<R> |
Iterator.zipWith(Iterable<? extends U> that,
BiFunction<? super T,? super U,? extends R> mapper) |
default Iterator<Tuple2<T,Integer>> |
Iterator.zipWithIndex() |
default <U> Iterator<U> |
Iterator.zipWithIndex(BiFunction<? super T,? super Integer,? extends U> mapper) |
Modifier and Type | Method and Description |
---|---|
default <C> Map<C,Iterator<T>> |
Iterator.groupBy(Function<? super T,? extends C> classifier) |
default Option<Iterator<T>> |
Iterator.initOption() |
default Tuple2<Iterator<T>,Iterator<T>> |
Iterator.partition(Predicate<? super T> predicate) |
default Tuple2<Iterator<T>,Iterator<T>> |
Iterator.partition(Predicate<? super T> predicate) |
default Tuple2<Iterator<T>,Iterator<T>> |
Iterator.span(Predicate<? super T> predicate) |
default Tuple2<Iterator<T>,Iterator<T>> |
Iterator.span(Predicate<? super T> predicate) |
default Option<Iterator<T>> |
Iterator.tailOption() |
default <T1,T2> Tuple2<Iterator<T1>,Iterator<T2>> |
Iterator.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2> Tuple2<Iterator<T1>,Iterator<T2>> |
Iterator.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2,T3> Tuple3<Iterator<T1>,Iterator<T2>,Iterator<T3>> |
Iterator.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Iterator<T1>,Iterator<T2>,Iterator<T3>> |
Iterator.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Iterator<T1>,Iterator<T2>,Iterator<T3>> |
Iterator.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
Modifier and Type | Method and Description |
---|---|
static <T> Iterator<T> |
Iterator.narrow(Iterator<? extends T> iterator)
Narrows a widened
Iterator<? extends T> to Iterator<T>
by performing a type-safe cast. |
Modifier and Type | Method and Description |
---|---|
default <U> U |
Iterator.transform(Function<? super Iterator<T>,? extends U> f)
Transforms this
Iterator . |
Modifier and Type | Method and Description |
---|---|
default Iterator<T> |
Future.iterator() |
Modifier and Type | Method and Description |
---|---|
default Iterator<T> |
Validation.iterator() |
default Iterator<T> |
Try.iterator() |
default Iterator<T> |
Option.iterator() |
default Iterator<R> |
Either.iterator() |
Iterator<L> |
Either.LeftProjection.iterator() |
Iterator<R> |
Either.RightProjection.iterator() |
Copyright © 2016. All Rights Reserved.