接口 Window<T>

  • 所有已知实现类:
    WindowBuilder

    public interface Window<T>
    Window building tool can specify window partition information, window range, and window sorting
    作者:
    caizhiao
    • 方法详细资料

      • 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 range
        end - 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 row
        after - 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 range
        end - 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
      • roundAllRow

        Window<T> roundAllRow()
        Specify window range this range is window all 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 row
        after - after n row of current row
      • partitions

        List<java.util.function.Function<T,​?>> partitions()
        get partitions info
      • getComparator

        Comparator<T> getComparator()
        get window comparator
      • getStartRange

        WindowRange getStartRange()
        get window start range
      • getEndRange

        WindowRange getEndRange()
        get window end range