Package | Description |
---|---|
javaslang | |
javaslang.collection |
Purely functional collections based on Traversable.
|
Modifier and Type | Method and Description |
---|---|
default Array<T> |
Value.toArray()
Converts this to a
Array . |
Modifier and Type | Method and Description |
---|---|
Array<T> |
Array.append(T element) |
Array<T> |
Array.appendAll(Iterable<? extends T> elements) |
Array<Array<T>> |
Array.combinations() |
Array<Array<T>> |
Array.combinations(int k) |
Array<T> |
Array.distinct() |
Array<T> |
Array.distinctBy(Comparator<? super T> comparator) |
<U> Array<T> |
Array.distinctBy(Function<? super T,? extends U> keyExtractor) |
Array<T> |
Array.drop(long n) |
Array<T> |
Array.dropRight(long n) |
Array<T> |
Array.dropUntil(Predicate<? super T> predicate) |
Array<T> |
Array.dropWhile(Predicate<? super T> predicate) |
static <T> Array<T> |
Array.empty() |
static <T> Array<T> |
Array.fill(int n,
Supplier<? extends T> s)
Returns an Array containing
n values supplied by a given Supplier s . |
Array<T> |
Array.filter(Predicate<? super T> predicate) |
<U> Array<U> |
Array.flatMap(Function<? super T,? extends Iterable<? extends U>> mapper) |
Array<T> |
Array.init() |
Array<T> |
Array.insert(int index,
T element) |
Array<T> |
Array.insertAll(int index,
Iterable<? extends T> elements) |
Array<T> |
Array.intersperse(T element) |
<U> Array<U> |
Array.map(Function<? super T,? extends U> mapper) |
static <T> Array<T> |
Array.narrow(Array<? extends T> array)
Narrows a widened
Array<? extends T> to Array<T>
by performing a type safe-cast. |
static <T> Array<T> |
Array.of(T... elements)
Creates a Array of the given elements.
|
static <T> Array<T> |
Array.of(T element)
Returns a singleton
Array , i.e. |
static Array<Boolean> |
Array.ofAll(boolean[] array)
Creates a Array based on the elements of a boolean array.
|
static Array<Byte> |
Array.ofAll(byte[] array)
Creates a Array based on the elements of a byte array.
|
static Array<Character> |
Array.ofAll(char[] array)
Creates a Array based on the elements of a char array.
|
static Array<Double> |
Array.ofAll(double[] array)
Creates a Array based on the elements of a double array.
|
static Array<Float> |
Array.ofAll(float[] array)
Creates a Array based on the elements of a float array.
|
static Array<Integer> |
Array.ofAll(int[] array)
Creates a Array based on the elements of an int array.
|
static <T> Array<T> |
Array.ofAll(Iterable<? extends T> elements)
Creates a Array of the given elements.
|
static Array<Long> |
Array.ofAll(long[] array)
Creates a Array based on the elements of a long array.
|
static Array<Short> |
Array.ofAll(short[] array)
Creates a Array based on the elements of a short array.
|
Array<T> |
Array.padTo(int length,
T element) |
Array<T> |
Array.patch(int from,
Iterable<? extends T> that,
int replaced) |
Array<T> |
Array.peek(Consumer<? super T> action) |
Array<Array<T>> |
Array.permutations() |
Array<T> |
Array.prepend(T element) |
Array<T> |
Array.prependAll(Iterable<? extends T> elements) |
static Array<Character> |
Array.range(char from,
char toExclusive) |
static Array<Integer> |
Array.range(int from,
int toExclusive)
Creates a Array of int numbers starting from
from , extending to toExclusive - 1 . |
static Array<Long> |
Array.range(long from,
long toExclusive)
Creates a Array of long numbers starting from
from , extending to toExclusive - 1 . |
static Array<Character> |
Array.rangeBy(char from,
char toExclusive,
int step) |
static Array<Double> |
Array.rangeBy(double from,
double toExclusive,
double step) |
static Array<Integer> |
Array.rangeBy(int from,
int toExclusive,
int step)
Creates a Array of int numbers starting from
from , extending to toExclusive - 1 ,
with step . |
static Array<Long> |
Array.rangeBy(long from,
long toExclusive,
long step)
Creates a Array of long numbers starting from
from , extending to toExclusive - 1 ,
with step . |
static Array<Character> |
Array.rangeClosed(char from,
char toInclusive) |
static Array<Integer> |
Array.rangeClosed(int from,
int toInclusive)
Creates a Array of int numbers starting from
from , extending to toInclusive . |
static Array<Long> |
Array.rangeClosed(long from,
long toInclusive)
Creates a Array of long numbers starting from
from , extending to toInclusive . |
static Array<Character> |
Array.rangeClosedBy(char from,
char toInclusive,
int step) |
static Array<Double> |
Array.rangeClosedBy(double from,
double toInclusive,
double step) |
static Array<Integer> |
Array.rangeClosedBy(int from,
int toInclusive,
int step)
Creates a Array of int numbers starting from
from , extending to toInclusive ,
with step . |
static Array<Long> |
Array.rangeClosedBy(long from,
long toInclusive,
long step)
Creates a Array of long numbers starting from
from , extending to toInclusive ,
with step . |
Array<T> |
Array.remove(T element) |
Array<T> |
Array.removeAll(Iterable<? extends T> elements) |
Array<T> |
Array.removeAll(T element) |
Array<T> |
Array.removeAt(int index) |
Array<T> |
Array.removeFirst(Predicate<T> predicate) |
Array<T> |
Array.removeLast(Predicate<T> predicate) |
Array<T> |
Array.replace(T currentElement,
T newElement) |
Array<T> |
Array.replaceAll(T currentElement,
T newElement) |
Array<T> |
Array.retainAll(Iterable<? extends T> elements) |
Array<T> |
Array.reverse() |
Array<T> |
Array.scan(T zero,
BiFunction<? super T,? super T,? extends T> operation) |
<U> Array<U> |
Array.scanLeft(U zero,
BiFunction<? super U,? super T,? extends U> operation) |
<U> Array<U> |
Array.scanRight(U zero,
BiFunction<? super T,? super U,? extends U> operation) |
Array<T> |
Array.slice(long beginIndex,
long endIndex) |
<U> Array<T> |
Array.sortBy(Comparator<? super U> comparator,
Function<? super T,? extends U> mapper) |
<U extends Comparable<? super U>> |
Array.sortBy(Function<? super T,? extends U> mapper) |
Array<T> |
Array.sorted() |
Array<T> |
Array.sorted(Comparator<? super T> comparator) |
Array<T> |
Array.subSequence(int beginIndex) |
Array<T> |
Array.subSequence(int beginIndex,
int endIndex) |
static <T> Array<T> |
Array.tabulate(int n,
Function<? super Integer,? extends T> f)
Returns an Array containing
n values of a given Function f
over a range of integer values from 0 to n - 1 . |
Array<T> |
Array.tail() |
Array<T> |
Array.take(long n) |
Array<T> |
Array.takeRight(long n) |
Array<T> |
Array.takeUntil(Predicate<? super T> predicate) |
Array<T> |
Array.takeWhile(Predicate<? super T> predicate) |
<U> Array<U> |
Array.unit(Iterable<? extends U> iterable) |
Array<T> |
Array.update(int index,
T element) |
<U> Array<Tuple2<T,U>> |
Array.zip(Iterable<? extends U> that) |
<U> Array<Tuple2<T,U>> |
Array.zipAll(Iterable<? extends U> that,
T thisElem,
U thatElem) |
Array<Tuple2<T,Long>> |
Array.zipWithIndex() |
Modifier and Type | Method and Description |
---|---|
static <T> Collector<T,ArrayList<T>,Array<T>> |
Array.collector()
Returns a
Collector which may be used in conjunction with
Stream.collect(java.util.stream.Collector) to obtain a Array . |
Array<Array<T>> |
Array.combinations() |
Array<Array<T>> |
Array.combinations(int k) |
Iterator<Array<T>> |
Array.crossProduct(int power) |
<C> Map<C,Array<T>> |
Array.groupBy(Function<? super T,? extends C> classifier) |
Iterator<Array<T>> |
Array.grouped(long size) |
Option<Array<T>> |
Array.initOption() |
Tuple2<Array<T>,Array<T>> |
Array.partition(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.partition(Predicate<? super T> predicate) |
Array<Array<T>> |
Array.permutations() |
Iterator<Array<T>> |
Array.sliding(long size) |
Iterator<Array<T>> |
Array.sliding(long size,
long step) |
Tuple2<Array<T>,Array<T>> |
Array.span(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.span(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.splitAt(long n) |
Tuple2<Array<T>,Array<T>> |
Array.splitAt(long n) |
Tuple2<Array<T>,Array<T>> |
Array.splitAt(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.splitAt(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.splitAtInclusive(Predicate<? super T> predicate) |
Tuple2<Array<T>,Array<T>> |
Array.splitAtInclusive(Predicate<? super T> predicate) |
Option<Array<T>> |
Array.tailOption() |
<T1,T2> Tuple2<Array<T1>,Array<T2>> |
Array.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
<T1,T2> Tuple2<Array<T1>,Array<T2>> |
Array.unzip(Function<? super T,Tuple2<? extends T1,? extends T2>> unzipper) |
<T1,T2,T3> Tuple3<Array<T1>,Array<T2>,Array<T3>> |
Array.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
<T1,T2,T3> Tuple3<Array<T1>,Array<T2>,Array<T3>> |
Array.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
<T1,T2,T3> Tuple3<Array<T1>,Array<T2>,Array<T3>> |
Array.unzip3(Function<? super T,Tuple3<? extends T1,? extends T2,? extends T3>> unzipper) |
Modifier and Type | Method and Description |
---|---|
static <T> Array<T> |
Array.narrow(Array<? extends T> array)
Narrows a widened
Array<? extends T> to Array<T>
by performing a type safe-cast. |
Modifier and Type | Method and Description |
---|---|
<U> U |
Array.transform(Function<? super Array<T>,? extends U> f)
Transforms this
Array . |
Copyright © 2016. All Rights Reserved.