|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfj.data.vector.V5<A>
public final class V5<A>
A vector-5.
Method Summary | ||
---|---|---|
static
|
__1()
A first-class function to get the first element of a vector. |
|
static
|
__2()
A first-class function to get the second element of a vector. |
|
static
|
__3()
A first-class function to get the third element of a vector. |
|
static
|
__4()
A first-class function to get the third element of a vector. |
|
static
|
__5()
A first-class function to get the third element of a vector. |
|
A |
_1()
Returns the first element of this vector. |
|
A |
_2()
Returns the second element of this vector. |
|
A |
_3()
Returns the third element of this vector. |
|
A |
_4()
Returns the fourth element of this vector. |
|
A |
_5()
Returns the fifth element of this vector. |
|
|
apply(V5<F<A,B>> vf)
Performs function application within a vector (applicative functor pattern). |
|
static
|
cons(P1<A> head,
V4<A> tail)
Creates a vector-5 from a head and a tail. |
|
P1<A> |
head()
Returns the first element of this vector, as a product-1. |
|
Iterator<A> |
iterator()
Returns an iterator for the elements of this vector. |
|
|
map(F<A,B> f)
Maps the given function across this vector. |
|
static
|
p_()
Returns a function that transforms a vector-5 to the equivalent product-5. |
|
P5<A,A,A,A,A> |
p()
Returns a homogeneous product-5 equivalent to this vector. |
|
static
|
p(P5<A,A,A,A,A> p)
Creates a vector-5 from a homogeneous product-5. |
|
V4<A> |
tail()
Returns all but the first element of this vector, as a vector-4. |
|
Array<A> |
toArray()
Returns an array with the elements of this vector. |
|
NonEmptyList<A> |
toNonEmptyList()
Returns a nonempty list with the elements of this vector. |
|
static
|
toStream_()
Returns a function that transforms a vector-5 to a stream of its elements. |
|
Stream<A> |
toStream()
Returns a stream of the elements of this vector. |
|
V5<V2<A>> |
vzip(V5<A> bs)
Zips this vector with the given vector to produce a vector of vectors. |
|
|
zip(V5<B> bs)
Zips this vector with the given vector to produce a vector of pairs. |
|
|
zipWith(F<A,F<B,C>> f,
V5<B> bs)
Zips this vector with the given vector using the given function to produce a new vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <A> V5<A> p(P5<A,A,A,A,A> p)
p
- The product-5 from which to create a vector.
public static <A> V5<A> cons(P1<A> head, V4<A> tail)
head
- The value to put as the first element of the vector.tail
- The vector representing all but the first element of the new vector.
public A _1()
public A _2()
public A _3()
public A _4()
public A _5()
public V4<A> tail()
public P1<A> head()
public Iterator<A> iterator()
iterator
in interface Iterable<A>
public P5<A,A,A,A,A> p()
public NonEmptyList<A> toNonEmptyList()
public Stream<A> toStream()
public Array<A> toArray()
public <B> V5<B> map(F<A,B> f)
f
- The function to map across this vector.
public <B> V5<B> apply(V5<F<A,B>> vf)
vf
- The vector of functions to apply.
public <B,C> V5<C> zipWith(F<A,F<B,C>> f, V5<B> bs)
bs
- The vector to zip this vector with.f
- The function to zip this vector and the given vector with.
public <B> V5<P2<A,B>> zip(V5<B> bs)
bs
- The vector to zip this vector with.
public V5<V2<A>> vzip(V5<A> bs)
bs
- The vector to zip this vector with.
public static <A> F<V5<A>,Stream<A>> toStream_()
public static <A> F<V5<A>,P5<A,A,A,A,A>> p_()
public static <A> F<V5<A>,A> __1()
public static <A> F<V5<A>,A> __2()
public static <A> F<V5<A>,A> __3()
public static <A> F<V5<A>,A> __4()
public static <A> F<V5<A>,A> __5()
|
Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg This software is released under an open source BSD licence. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |