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 |
---|---|
Seq<?> |
Tuple8.toSeq() |
Seq<?> |
Tuple7.toSeq() |
Seq<?> |
Tuple6.toSeq() |
Seq<?> |
Tuple5.toSeq() |
Seq<?> |
Tuple4.toSeq() |
Seq<?> |
Tuple3.toSeq() |
Seq<?> |
Tuple2.toSeq() |
Seq<?> |
Tuple1.toSeq() |
Seq<?> |
Tuple0.toSeq() |
Seq<?> |
Tuple.toSeq()
Converts this tuple to a sequence.
|
Modifier and Type | Method and Description |
---|---|
static <T> Lazy<Seq<T>> |
Lazy.sequence(Iterable<? extends Lazy<? extends T>> values)
Reduces many
Lazy values into a single Lazy by transforming an
Iterable<Lazy<? extends T>> into a Lazy<Seq<T>> . |
Modifier and Type | Interface and Description |
---|---|
interface |
IndexedSeq<T>
Interface for immutable, indexed sequences.
|
interface |
LinearSeq<T>
Interface for immutable, linear sequences.
|
interface |
List<T>
An immutable
List is an eager sequence of elements. |
interface |
Stream<T>
An immutable
Stream is lazy sequence of elements which may be infinitely long. |
Modifier and Type | Class and Description |
---|---|
class |
Array<T>
Array is a Traversable wrapper for
Object[] containing elements of type T . |
class |
CharSeq
The CharSeq (read: character sequence) collection essentially is a rich String wrapper having all operations
we know from the functional Javaslang collections.
|
static class |
List.Cons<T>
Non-empty
List , consisting of a head and a tail . |
static class |
List.Nil<T>
Representation of the singleton empty
List . |
class |
Queue<T>
An immutable
Queue stores elements allowing a first-in-first-out (FIFO) retrieval. |
static class |
Stream.Cons<T>
Non-empty
Stream , consisting of a head , and tail . |
static class |
Stream.Empty<T>
The empty Stream.
|
class |
Vector<T>
Vector is the default Seq implementation.
|
Modifier and Type | Method and Description |
---|---|
Seq<T> |
Seq.append(T element)
Appends an element to this.
|
Seq<T> |
Seq.appendAll(Iterable<? extends T> elements)
Appends all given elements to this.
|
Seq<? extends Seq<T>> |
Seq.combinations()
Returns the union of all combinations from k = 0 to length().
|
Seq<? extends Seq<T>> |
Seq.combinations(int k)
Returns the k-combination of this traversable, i.e.
|
default Seq<T> |
Tree.distinct() |
Seq<T> |
Seq.distinct() |
default Seq<T> |
Tree.distinctBy(Comparator<? super T> comparator) |
Seq<T> |
Seq.distinctBy(Comparator<? super T> comparator) |
default <U> Seq<T> |
Tree.distinctBy(Function<? super T,? extends U> keyExtractor) |
<U> Seq<T> |
Seq.distinctBy(Function<? super T,? extends U> keyExtractor) |
default Seq<T> |
Tree.drop(long n) |
Seq<T> |
Seq.drop(long n) |
default Seq<T> |
Tree.dropRight(long n) |
Seq<T> |
Seq.dropRight(long n) |
default Seq<T> |
Tree.dropUntil(Predicate<? super T> predicate) |
Seq<T> |
Seq.dropUntil(Predicate<? super T> predicate) |
default Seq<T> |
Tree.dropWhile(Predicate<? super T> predicate) |
Seq<T> |
Seq.dropWhile(Predicate<? super T> predicate) |
default Seq<T> |
Tree.filter(Predicate<? super T> predicate) |
Seq<T> |
Seq.filter(Predicate<? super T> predicate) |
<U> Seq<U> |
Seq.flatMap(Function<? super T,? extends Iterable<? extends U>> mapper) |
default <U> Seq<U> |
Map.flatMap(Function<? super Tuple2<K,V>,? extends Iterable<? extends U>> mapper)
Flat-maps this entries to a sequence of values.
|
default Seq<T> |
Tree.init() |
Seq<T> |
Seq.init() |
Seq<T> |
Seq.insert(int index,
T element)
Inserts the given element at the specified index.
|
Seq<T> |
Seq.insertAll(int index,
Iterable<? extends T> elements)
Inserts the given elements at the specified index.
|
Seq<T> |
Seq.intersperse(T element)
Inserts an element between all elements of this Traversable.
|
<U> Seq<U> |
Seq.map(Function<? super T,? extends U> mapper) |
default <U> Seq<U> |
Map.map(Function<? super Tuple2<K,V>,? extends U> mapper)
Maps the
Map entries to a sequence of values. |
static <T> Seq<T> |
Seq.narrow(Seq<? extends T> seq)
Narrows a widened
Seq<? extends T> to Seq<T>
by performing a type safe-cast. |
Seq<T> |
Seq.padTo(int length,
T element)
A copy of this sequence with an element appended until a given target length is reached.
|
Seq<T> |
Seq.patch(int from,
Iterable<? extends T> that,
int replaced)
Produces a new list where a slice of elements in this list is replaced by another sequence.
|
Seq<T> |
Seq.peek(Consumer<? super T> action) |
Seq<? extends Seq<T>> |
Seq.permutations()
Computes all unique permutations.
|
Seq<T> |
Seq.prepend(T element)
Prepends an element to this.
|
Seq<T> |
Seq.prependAll(Iterable<? extends T> elements)
Prepends all given elements to this.
|
Seq<T> |
Seq.remove(T element)
Removes the first occurrence of the given element.
|
Seq<T> |
Seq.removeAll(Iterable<? extends T> elements)
Removes all occurrences of the given elements.
|
Seq<T> |
Seq.removeAll(T element)
Removes all occurrences of the given element.
|
Seq<T> |
Seq.removeAt(int index)
Removes the element at the specified position in this sequence.
|
Seq<T> |
Seq.removeFirst(Predicate<T> predicate)
Removes the first occurrence that satisfy predicate
|
Seq<T> |
Seq.removeLast(Predicate<T> predicate)
Removes the last occurrence that satisfy predicate
|
Seq<T> |
Seq.replace(T currentElement,
T newElement) |
Seq<T> |
Seq.replaceAll(T currentElement,
T newElement) |
default Seq<T> |
Tree.retainAll(Iterable<? extends T> elements) |
Seq<T> |
Seq.retainAll(Iterable<? extends T> elements) |
Seq<T> |
Seq.reverse()
Reverses the order of elements.
|
default Seq<T> |
Tree.scan(T zero,
BiFunction<? super T,? super T,? extends T> operation) |
Seq<T> |
Seq.scan(T zero,
BiFunction<? super T,? super T,? extends T> operation) |
default <U> Seq<U> |
Tree.scanLeft(U zero,
BiFunction<? super U,? super T,? extends U> operation) |
<U> Seq<U> |
Seq.scanLeft(U zero,
BiFunction<? super U,? super T,? extends U> operation) |
default <U> Seq<U> |
Map.scanLeft(U zero,
BiFunction<? super U,? super Tuple2<K,V>,? extends U> operation) |
default <U> Seq<U> |
Tree.scanRight(U zero,
BiFunction<? super T,? super U,? extends U> operation) |
<U> Seq<U> |
Seq.scanRight(U zero,
BiFunction<? super T,? super U,? extends U> operation) |
default <U> Seq<U> |
Map.scanRight(U zero,
BiFunction<? super Tuple2<K,V>,? super U,? extends U> operation) |
Seq<T> |
Seq.slice(long beginIndex,
long endIndex)
Returns a Seq that is a slice of this.
|
<U> Seq<T> |
Seq.sortBy(Comparator<? super U> comparator,
Function<? super T,? extends U> mapper)
Sorts this elements by comparing the elements in a different domain, using the given
mapper . |
<U extends Comparable<? super U>> |
Seq.sortBy(Function<? super T,? extends U> mapper)
Sorts this elements by comparing the elements in a different domain, using the given
mapper . |
Seq<T> |
Seq.sorted()
Sorts this elements according to their natural order.
|
Seq<T> |
Seq.sorted(Comparator<? super T> comparator)
Sorts this elements according to the provided
Comparator . |
Seq<T> |
Seq.subSequence(int beginIndex)
Returns a Seq that is a subsequence of this.
|
Seq<T> |
Seq.subSequence(int beginIndex,
int endIndex)
Returns a Seq that is a subsequence of this.
|
default Seq<T> |
Tree.tail() |
Seq<T> |
Seq.tail() |
default Seq<T> |
Tree.take(long n) |
Seq<T> |
Seq.take(long n) |
default Seq<T> |
Tree.takeRight(long n) |
Seq<T> |
Seq.takeRight(long n) |
default Seq<T> |
Tree.takeUntil(Predicate<? super T> predicate) |
Seq<T> |
Seq.takeUntil(Predicate<? super T> predicate) |
default Seq<T> |
Tree.takeWhile(Predicate<? super T> predicate) |
Seq<T> |
Seq.takeWhile(Predicate<? super T> predicate) |
default Seq<Tree.Node<T>> |
Tree.traverse()
Traverses this tree in
Tree.Order.PRE_ORDER . |
default <U> Seq<U> |
Map.traverse(BiFunction<K,V,? extends U> mapper) |
default Seq<Tree.Node<T>> |
Tree.traverse(Tree.Order order)
Traverses this tree in a specific order.
|
<U> Seq<U> |
Seq.unit(Iterable<? extends U> iterable) |
Seq<T> |
Seq.update(int index,
T element)
Updates the given element at the specified index.
|
Seq<V> |
TreeMap.values() |
default Seq<T> |
Tree.values()
Traverses this tree values in
Tree.Order.PRE_ORDER . |
Seq<V> |
Map.values() |
Seq<V> |
LinkedHashMap.values() |
Seq<V> |
HashMap.values() |
default Seq<T> |
Tree.values(Tree.Order order)
Traverses this tree values in a specific order.
|
<U> Seq<Tuple2<T,U>> |
Seq.zip(Iterable<? extends U> that) |
default <U> Seq<Tuple2<Tuple2<K,V>,U>> |
Map.zip(Iterable<? extends U> that) |
<U> Seq<Tuple2<T,U>> |
Seq.zipAll(Iterable<? extends U> that,
T thisElem,
U thatElem) |
default <U> Seq<Tuple2<Tuple2<K,V>,U>> |
Map.zipAll(Iterable<? extends U> that,
Tuple2<K,V> thisElem,
U thatElem) |
Seq<Tuple2<T,Long>> |
Seq.zipWithIndex() |
default Seq<Tuple2<Tuple2<K,V>,Long>> |
Map.zipWithIndex() |
Modifier and Type | Method and Description |
---|---|
Seq<? extends Seq<T>> |
Seq.combinations()
Returns the union of all combinations from k = 0 to length().
|
Seq<? extends Seq<T>> |
Seq.combinations(int k)
Returns the k-combination of this traversable, i.e.
|
Iterator<? extends Seq<T>> |
Seq.crossProduct(int power)
Calculates the n-ary cartesian power (or cross product or simply product) of this.
|
default <C> Map<C,Seq<T>> |
Tree.groupBy(Function<? super T,? extends C> classifier) |
<C> Map<C,? extends Seq<T>> |
Seq.groupBy(Function<? super T,? extends C> classifier) |
default Iterator<Seq<T>> |
Tree.grouped(long size) |
Iterator<? extends Seq<T>> |
Seq.grouped(long size) |
default Iterator<Seq<T>> |
Iterator.grouped(long size) |
default Option<Seq<T>> |
Tree.initOption() |
Option<? extends Seq<T>> |
Seq.initOption() |
default Tuple2<Seq<T>,Seq<T>> |
Tree.partition(Predicate<? super T> predicate) |
default Tuple2<Seq<T>,Seq<T>> |
Tree.partition(Predicate<? super T> predicate) |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.partition(Predicate<? super T> predicate) |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.partition(Predicate<? super T> predicate) |
Seq<? extends Seq<T>> |
Seq.permutations()
Computes all unique permutations.
|
default Iterator<Seq<T>> |
Tree.sliding(long size) |
Iterator<? extends Seq<T>> |
Seq.sliding(long size) |
default Iterator<Seq<T>> |
Iterator.sliding(long size) |
default Iterator<Seq<T>> |
Tree.sliding(long size,
long step) |
Iterator<? extends Seq<T>> |
Seq.sliding(long size,
long step) |
default Iterator<Seq<T>> |
Iterator.sliding(long size,
long step) |
default Tuple2<Seq<T>,Seq<T>> |
Tree.span(Predicate<? super T> predicate) |
default Tuple2<Seq<T>,Seq<T>> |
Tree.span(Predicate<? super T> predicate) |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.span(Predicate<? super T> predicate) |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.span(Predicate<? super T> predicate) |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAt(long n)
Splits a Seq at the specified index.
|
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAt(long n)
Splits a Seq at the specified index.
|
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAt(Predicate<? super T> predicate)
Splits a sequence at the first element which satisfies the
Predicate , e.g. |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAt(Predicate<? super T> predicate)
Splits a sequence at the first element which satisfies the
Predicate , e.g. |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAtInclusive(Predicate<? super T> predicate)
Splits a sequence at the first element which satisfies the
Predicate , e.g. |
Tuple2<? extends Seq<T>,? extends Seq<T>> |
Seq.splitAtInclusive(Predicate<? super T> predicate)
Splits a sequence at the first element which satisfies the
Predicate , e.g. |
default Option<Seq<T>> |
Tree.tailOption() |
Option<? extends Seq<T>> |
Seq.tailOption() |
default <T1,T2> Tuple2<Seq<T1>,Seq<T2>> |
Map.unzip(BiFunction<? super K,? super V,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2> Tuple2<Seq<T1>,Seq<T2>> |
Map.unzip(BiFunction<? super K,? super V,Tuple2<? extends T1,? extends T2>> unzipper) |
<T1,T2> Tuple2<? extends Seq<T1>,? extends Seq<T2>> |
Seq.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
<T1,T2> Tuple2<? extends Seq<T1>,? extends Seq<T2>> |
Seq.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2> Tuple2<Seq<T1>,Seq<T2>> |
Map.unzip(Function<? super Tuple2<K,V>,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2> Tuple2<Seq<T1>,Seq<T2>> |
Map.unzip(Function<? super Tuple2<K,V>,Tuple2<? extends T1,? extends T2>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(BiFunction<? super K,? super V,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(BiFunction<? super K,? super V,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(BiFunction<? super K,? super V,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
<T1,T2,T3> Tuple3<? extends Seq<T1>,? extends Seq<T2>,? extends Seq<T3>> |
Seq.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
<T1,T2,T3> Tuple3<? extends Seq<T1>,? extends Seq<T2>,? extends Seq<T3>> |
Seq.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
<T1,T2,T3> Tuple3<? extends Seq<T1>,? extends Seq<T2>,? extends Seq<T3>> |
Seq.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(Function<? super Tuple2<K,V>,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(Function<? super Tuple2<K,V>,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
default <T1,T2,T3> Tuple3<Seq<T1>,Seq<T2>,Seq<T3>> |
Map.unzip3(Function<? super Tuple2<K,V>,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
Modifier and Type | Method and Description |
---|---|
default boolean |
Seq.endsWith(Seq<? extends T> that)
Tests whether this sequence ends with the given sequence.
|
default boolean |
IndexedSeq.endsWith(Seq<? extends T> that) |
static <T> Seq<T> |
Seq.narrow(Seq<? extends T> seq)
Narrows a widened
Seq<? extends T> to Seq<T>
by performing a type safe-cast. |
Modifier and Type | Method and Description |
---|---|
static <T> Future<Seq<T>> |
Future.sequence(ExecutorService executorService,
Iterable<? extends Future<? extends T>> futures)
Reduces many
Future s into a single Future by transforming an
Iterable<Future<? extends T>> into a Future<Seq<T>> . |
static <T> Future<Seq<T>> |
Future.sequence(Iterable<? extends Future<? extends T>> futures)
Reduces many
Future s into a single Future by transforming an
Iterable<Future<? extends T>> into a Future<Seq<T>> . |
static <T,U> Future<Seq<U>> |
Future.traverse(ExecutorService executorService,
Iterable<? extends T> values,
Function<? super T,? extends Future<? extends U>> mapper)
Maps the values of an iterable in parallel to a sequence of mapped values into a single
Future by
transforming an Iterable<? extends T> into a Future<Seq<U>> . |
static <T,U> Future<Seq<U>> |
Future.traverse(Iterable<? extends T> values,
Function<? super T,? extends Future<? extends U>> mapper)
Maps the values of an iterable in parallel to a sequence of mapped values into a single
Future by
transforming an Iterable<? extends T> into a Future<Seq<U>> . |
Modifier and Type | Method and Description |
---|---|
static <T> Option<Seq<T>> |
Option.sequence(Iterable<? extends Option<? extends T>> values)
Reduces many
Option s into a single Option by transforming an
Iterable<Option<? extends T>> into a Option<Seq<T>> . |
static <T> Try<Seq<T>> |
Try.sequence(Iterable<? extends Try<? extends T>> values)
Reduces many
Try s into a single Try by transforming an
Iterable<Try<? extends T>> into a Try<Seq<T>> . |
static <E,T> Validation<List<E>,Seq<T>> |
Validation.sequence(Iterable<? extends Validation<List<E>,T>> values)
Reduces many
Validation instances into a single Validation by transforming an
Iterable<Validation<? extends T>> into a Validation<Seq<T>> . |
Copyright © 2016. All Rights Reserved.