|
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.fingertrees.Digit<V,A>
fj.data.fingertrees.Four<V,A>
public final class Four<V,A>
A four-element prefix or suffix of a finger tree.
Method Summary | ||
---|---|---|
|
foldLeft(F<B,F<A,B>> bff,
B z)
Folds this digit to the left using the given function and the given initial value. |
|
|
foldRight(F<A,F<B,B>> aff,
B z)
Folds this digit to the right using the given function and the given initial value. |
|
|
match(F<One<V,A>,B> one,
F<Two<V,A>,B> two,
F<Three<V,A>,B> three,
F<Four<V,A>,B> four)
Structural pattern matching on digits. |
|
V4<A> |
values()
Returns the elements of this digit as a vector. |
Methods inherited from class fj.data.fingertrees.Digit |
---|
map, measure, reduceLeft, reduceRight, toTree |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public <B> B foldRight(F<A,F<B,B>> aff, B z)
Digit
foldRight
in class Digit<V,A>
aff
- A function with which to fold this digit.z
- An initial value to apply at the rightmost end of the fold.
Digit.foldRight(fj.F, Object)
public <B> B foldLeft(F<B,F<A,B>> bff, B z)
Digit
foldLeft
in class Digit<V,A>
bff
- A function with which to fold this digit.z
- An initial value to apply at the leftmost end of the fold.
Digit.foldLeft(fj.F, Object)
public <B> B match(F<One<V,A>,B> one, F<Two<V,A>,B> two, F<Three<V,A>,B> three, F<Four<V,A>,B> four)
Digit
match
in class Digit<V,A>
one
- A function to apply to this digit if it's One.two
- A function to apply to this digit if it's Two.three
- A function to apply to this digit if it's Three.four
- A function to apply to this digit if it's Four.
Digit.match(fj.F, fj.F, fj.F, fj.F)
public V4<A> values()
|
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 |