Package org.reactfx.util
Class FingerTree.Leaf<T,S>
- java.lang.Object
-
- org.reactfx.util.FingerTree<T,S>
-
- org.reactfx.util.FingerTree.NonEmptyFingerTree<T,S>
-
- org.reactfx.util.FingerTree.Leaf<T,S>
-
- Enclosing class:
- FingerTree<T,S>
private static class FingerTree.Leaf<T,S> extends FingerTree.NonEmptyFingerTree<T,S>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.reactfx.util.FingerTree
FingerTree.NonEmptyFingerTree<T,S>
-
-
Constructor Summary
Constructors Constructor Description Leaf(ToSemigroup<? super T,S> semigroup, T data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) Either<FingerTree.Leaf<T,S>,Tuple2<FingerTree.NonEmptyFingerTree<T,S>,FingerTree.NonEmptyFingerTree<T,S>>>appendLte(FingerTree<T,S> right)java.util.List<T>asList()Returns a list view of this tree.<R> Rfold(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction)(package private) <R> RfoldBetween0(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction, int startLeaf, int endLeaf)(package private) <R> RfoldBetween0(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction, java.util.function.ToIntFunction<? super S> metric, int startPosition, int endPosition, TetraFunction<? super R,? super T,java.lang.Integer,java.lang.Integer,? extends R> rangeReduction)(package private) TgetData()intgetDepth()(package private) TgetLeaf0(int index)intgetLeafCount()SgetSummary()(package private) SgetSummaryBetween0(int startLeaf, int endLeaf)(package private) SgetSummaryBetween0(java.util.function.ToIntFunction<? super S> metric, int startPosition, int endPosition, TriFunction<? super T,java.lang.Integer,java.lang.Integer,? extends S> subSummary)java.util.Optional<S>getSummaryOpt()(package private) BiIndexlocate0(java.util.function.BiFunction<? super S,java.lang.Integer,Either<java.lang.Integer,java.lang.Integer>> navigate, int position)(package private) BiIndexlocateProgressively0(java.util.function.ToIntFunction<? super S> metric, int position)(package private) BiIndexlocateRegressively0(java.util.function.ToIntFunction<? super S> metric, int position)(package private) Either<FingerTree.Leaf<T,S>,Tuple2<FingerTree.NonEmptyFingerTree<T,S>,FingerTree.NonEmptyFingerTree<T,S>>>prependLte(FingerTree<T,S> left)(package private) Tuple2<FingerTree<T,S>,FingerTree<T,S>>split0(int beforeLeaf)java.lang.StringtoString()(package private) FingerTree.NonEmptyFingerTree<T,S>updateLeaf0(int index, T data)-
Methods inherited from class org.reactfx.util.FingerTree.NonEmptyFingerTree
appendTree, caseEmpty, join, locate, locateProgressively, locateRegressively, prependTree, split, split, splitAt
-
Methods inherited from class org.reactfx.util.FingerTree
append, empty, empty, foldBetween, foldBetween, get, get, getLeaf, getSummary, getSummaryBetween, getSummaryBetween, insertLeaf, isEmpty, leaf, measure, mkTree, mkTree, prepend, removeLeafs, split, updateLeaf
-
-
-
-
Constructor Detail
-
Leaf
Leaf(ToSemigroup<? super T,S> semigroup, T data)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDepth
public int getDepth()
- Specified by:
getDepthin classFingerTree<T,S>
-
getLeafCount
public int getLeafCount()
- Specified by:
getLeafCountin classFingerTree<T,S>
-
asList
public java.util.List<T> asList()
Description copied from class:FingerTreeReturns a list view of this tree. Complexity of operations on the returned list:size(): O(1);get: O(log(n));- iteration: O(n) in either direction, with O(log(n)) total allocations;
subList: O(log(n));- iterative
subList, i.e. callingsubListon the result of previoussubList, up to n times: O(n).
- Specified by:
asListin classFingerTree<T,S>
-
getLeaf0
T getLeaf0(int index)
- Specified by:
getLeaf0in classFingerTree<T,S>
-
updateLeaf0
FingerTree.NonEmptyFingerTree<T,S> updateLeaf0(int index, T data)
- Specified by:
updateLeaf0in classFingerTree<T,S>
-
getData
T getData()
- Specified by:
getDatain classFingerTree<T,S>
-
getSummary
public S getSummary()
- Specified by:
getSummaryin classFingerTree.NonEmptyFingerTree<T,S>
-
getSummaryOpt
public java.util.Optional<S> getSummaryOpt()
- Specified by:
getSummaryOptin classFingerTree<T,S>
-
locateProgressively0
BiIndex locateProgressively0(java.util.function.ToIntFunction<? super S> metric, int position)
- Specified by:
locateProgressively0in classFingerTree.NonEmptyFingerTree<T,S>
-
locateRegressively0
BiIndex locateRegressively0(java.util.function.ToIntFunction<? super S> metric, int position)
- Specified by:
locateRegressively0in classFingerTree.NonEmptyFingerTree<T,S>
-
fold
public <R> R fold(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction)- Specified by:
foldin classFingerTree<T,S>
-
foldBetween0
<R> R foldBetween0(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction, int startLeaf, int endLeaf)- Specified by:
foldBetween0in classFingerTree<T,S>
-
foldBetween0
<R> R foldBetween0(R acc, java.util.function.BiFunction<? super R,? super T,? extends R> reduction, java.util.function.ToIntFunction<? super S> metric, int startPosition, int endPosition, TetraFunction<? super R,? super T,java.lang.Integer,java.lang.Integer,? extends R> rangeReduction)- Specified by:
foldBetween0in classFingerTree<T,S>
-
getSummaryBetween0
S getSummaryBetween0(int startLeaf, int endLeaf)
- Specified by:
getSummaryBetween0in classFingerTree<T,S>
-
getSummaryBetween0
S getSummaryBetween0(java.util.function.ToIntFunction<? super S> metric, int startPosition, int endPosition, TriFunction<? super T,java.lang.Integer,java.lang.Integer,? extends S> subSummary)
- Specified by:
getSummaryBetween0in classFingerTree<T,S>
-
appendLte
Either<FingerTree.Leaf<T,S>,Tuple2<FingerTree.NonEmptyFingerTree<T,S>,FingerTree.NonEmptyFingerTree<T,S>>> appendLte(FingerTree<T,S> right)
- Specified by:
appendLtein classFingerTree.NonEmptyFingerTree<T,S>
-
prependLte
Either<FingerTree.Leaf<T,S>,Tuple2<FingerTree.NonEmptyFingerTree<T,S>,FingerTree.NonEmptyFingerTree<T,S>>> prependLte(FingerTree<T,S> left)
- Specified by:
prependLtein classFingerTree.NonEmptyFingerTree<T,S>
-
split0
Tuple2<FingerTree<T,S>,FingerTree<T,S>> split0(int beforeLeaf)
- Specified by:
split0in classFingerTree<T,S>
-
-