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