Class V2<A>
java.lang.Object
fj.data.vector.V2<A>
- All Implemented Interfaces:
Iterable<A>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription__1()A first-class function to get the first element of a vector.__2()A first-class function to get the second element of a vector._1()Returns the first element of this vector._2()Returns the second element of this vector.<B> V2<B> Performs function application within a vector (applicative functor pattern).final booleanfinal inthashCode()head()Return the first element of this vector as a product-1.iterator()Returns an iterator for the elements of this vector.<B> V2<B> Maps the given function across this vector.p()Returns a homogeneous product-2 equivalent to this vector.static <A> V2<A> Creates a vector-2 from a homogeneous product-2.p_()Returns a function that transforms a vector-2 to the equivalent product-2.toArray()Returns an array with the elements of this vector.Returns a nonempty list with the elements of this vector.toStream()Returns a stream of the elements of this vector.Returns a function that transforms a vector-2 to a stream of its elements.Zips this vector with the given vector to produce a vector of vectors.Zips this vector with the given vector to produce a vector of pairs.<B,C> V2 <C> Zips this vector with the given vector using the given function to produce a new vector.Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
inner
-
-
Constructor Details
-
V2
-
-
Method Details
-
equals
-
hashCode
-
p
-
_1
-
_2
Returns the second element of this vector.- Returns:
- the second element of this vector.
-
__1
-
__2
-
iterator
-
p
-
toNonEmptyList
Returns a nonempty list with the elements of this vector.- Returns:
- a nonempty list with the elements of this vector.
-
toStream
-
toStream_
-
p_
-
toArray
-
map
-
apply
-
zipWith
Zips this vector with the given vector using the given function to produce a new vector.- Parameters:
f- The function to zip this vector and the given vector with.bs- The vector to zip this vector with.- Returns:
- A new vector with the results of the function.
-
zip
-
vzip
-
head
-