Class Two<V,A>
java.lang.Object
fj.data.fingertrees.Digit<V,A>
fj.data.fingertrees.Two<V,A>
A two-element prefix or suffix of a finger tree.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<B> BFolds this digit to the left using the given function and the given initial value.<B> BFolds this digit to the right using the given function and the given initial value.intlength()<B> BStructural pattern matching on digits.toStream()toString()values()Returns the elements of this digit as a vector.Methods inherited from class Digit
init, map, measure, measured, reduceLeft, reduceRight, tail, toTree
-
Field Details
-
as
-
-
Constructor Details
-
Two
-
-
Method Details
-
foldRight
Description copied from class:DigitFolds this digit to the right using the given function and the given initial value. -
foldLeft
Description copied from class:DigitFolds this digit to the left using the given function and the given initial value. -
match
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) Description copied from class:DigitStructural pattern matching on digits. Applies the function that matches the structure of this digit.- Specified by:
matchin classDigit<V,A> - Parameters:
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.- Returns:
- The result of applying the function matching this Digit.
-
values
-
split1
-
lookup
-
length
-
toString
-
toStream
-