接口 Window<T>
-
- 所有已知实现类:
WindowBuilder
public interface Window<T>Window building tool can specify window partition information, window range, and window sorting- 作者:
- caizhiao
-
-
方法概要
所有方法 静态方法 实例方法 抽象方法 修饰符和类型 方法 说明 Comparator<T>getComparator()get window comparatorWindowRangegetEndRange()get window end rangeWindowRangegetStartRange()get window start rangestatic <T> Window<T>groupBy(java.util.function.Function<T,?>... groupField)open a Window by partitioning based on provided fieldsList<java.util.function.Function<T,?>>partitions()get partitions infoWindow<T>roundAllRow()Specify window range this range is window all rowstatic <T> Window<T>roundAllRowBy()open a Window by window range this range is window all rowWindow<T>roundBefore2CurrentRow(int n)Specify window range this range is form the first n lines of the current row to the current rowstatic <T> Window<T>roundBefore2CurrentRowBy(int n)open a Window by window range this range is form the first n lines of the current row to the current rowWindow<T>roundBeforeAfter(int before, int after)Specify window range this range is from before n row of current row to after n row of current rowstatic <T> Window<T>roundBeforeAfterBy(int before, int after)open a Window by window range this range is from before n row of current row to after n row of current rowWindow<T>roundBetween(WindowRange start, WindowRange end)Specify window rangestatic <T> Window<T>roundBetweenBy(WindowRange start, WindowRange end)open a Window by window range this range is form start to endWindow<T>roundCurrentRow2After(int n)Specify window range this range is form the current row to the last n row of the current rowstatic <T> Window<T>roundCurrentRow2AfterBy(int n)open a Window by window range this range is form the current row to the last n row of the current rowWindow<T>roundCurrentRow2EndRow()Specify window range this range is form the current row to the end rowstatic <T> Window<T>roundCurrentRow2EndRowBy()open a Window by window range this range is form the current row to the end rowWindow<T>roundStartRow2CurrentRow()Specify window range this range is form the start row to the current rowstatic <T> Window<T>roundStartRow2CurrentRowBy()open a Window by window range this range is form the start row to the current rowWindow<T>sort(Comparator<T> comparator)sort window by Comparator<U extends Comparable<? super U>>
Window<T>sortAsc(java.util.function.Function<T,U> sortField)Sort windows in ascending order according to specified fieldsstatic <T,U extends Comparable<? super U>>
Window<T>sortAscBy(java.util.function.Function<T,U> sortField)open a Window by ascending sortstatic <T> Window<T>sortBy(Sorter<T> sorter)open a Window by Sorterstatic <T> Window<T>sortBy(Comparator<T> comparator)open a Window by Comparator<U extends Comparable<? super U>>
Window<T>sortDesc(java.util.function.Function<T,U> sortField)Sort windows in descending order according to specified fieldsstatic <T,U extends Comparable<? super U>>
Window<T>sortDescBy(java.util.function.Function<T,U> sortField)open a Window by descending order
-
-
-
方法详细资料
-
groupBy
@SafeVarargs static <T> Window<T> groupBy(java.util.function.Function<T,?>... groupField)
open a Window by partitioning based on provided fields- 参数:
groupField- group fields
-
sortAscBy
static <T,U extends Comparable<? super U>> Window<T> sortAscBy(java.util.function.Function<T,U> sortField)
open a Window by ascending sort- 参数:
sortField- sort fields
-
sortDescBy
static <T,U extends Comparable<? super U>> Window<T> sortDescBy(java.util.function.Function<T,U> sortField)
open a Window by descending order- 参数:
sortField- sort fields
-
sortBy
static <T> Window<T> sortBy(Comparator<T> comparator)
open a Window by Comparator- 参数:
comparator- window sort comparator
-
sortBy
static <T> Window<T> sortBy(Sorter<T> sorter)
open a Window by Sorter- 参数:
sorter- window sorter
-
roundBetweenBy
static <T> Window<T> roundBetweenBy(WindowRange start, WindowRange end)
open a Window by window range this range is form start to end- 参数:
start- start rangeend- end range
-
roundBefore2CurrentRowBy
static <T> Window<T> roundBefore2CurrentRowBy(int n)
open a Window by window range this range is form the first n lines of the current row to the current row- 参数:
n- The first n lines of the current row
-
roundCurrentRow2AfterBy
static <T> Window<T> roundCurrentRow2AfterBy(int n)
open a Window by window range this range is form the current row to the last n row of the current row- 参数:
n- the last n row of the current row
-
roundCurrentRow2EndRowBy
static <T> Window<T> roundCurrentRow2EndRowBy()
open a Window by window range this range is form the current row to the end row
-
roundStartRow2CurrentRowBy
static <T> Window<T> roundStartRow2CurrentRowBy()
open a Window by window range this range is form the start row to the current row
-
roundAllRowBy
static <T> Window<T> roundAllRowBy()
open a Window by window range this range is window all row
-
roundBeforeAfterBy
static <T> Window<T> roundBeforeAfterBy(int before, int after)
open a Window by window range this range is from before n row of current row to after n row of current row- 参数:
before- before n row of current rowafter- after n row of current row
-
sortAsc
<U extends Comparable<? super U>> Window<T> sortAsc(java.util.function.Function<T,U> sortField)
Sort windows in ascending order according to specified fields- 参数:
sortField- sort field
-
sortDesc
<U extends Comparable<? super U>> Window<T> sortDesc(java.util.function.Function<T,U> sortField)
Sort windows in descending order according to specified fields- 参数:
sortField- sort field
-
sort
Window<T> sort(Comparator<T> comparator)
sort window by Comparator- 参数:
comparator- sort comparator
-
roundBetween
Window<T> roundBetween(WindowRange start, WindowRange end)
Specify window range- 参数:
start- window start rangeend- window end range
-
roundBefore2CurrentRow
Window<T> roundBefore2CurrentRow(int n)
Specify window range this range is form the first n lines of the current row to the current row- 参数:
n- The first n lines of the current row
-
roundCurrentRow2After
Window<T> roundCurrentRow2After(int n)
Specify window range this range is form the current row to the last n row of the current row- 参数:
n- the last n row of the current row
-
roundCurrentRow2EndRow
Window<T> roundCurrentRow2EndRow()
Specify window range this range is form the current row to the end row
-
roundStartRow2CurrentRow
Window<T> roundStartRow2CurrentRow()
Specify window range this range is form the start row to the current row
-
roundBeforeAfter
Window<T> roundBeforeAfter(int before, int after)
Specify window range this range is from before n row of current row to after n row of current row- 参数:
before- before n row of current rowafter- after n row of current row
-
getComparator
Comparator<T> getComparator()
get window comparator
-
getStartRange
WindowRange getStartRange()
get window start range
-
getEndRange
WindowRange getEndRange()
get window end range
-
-