接口 IFrame<T>

    • 方法详细资料

      • toLists

        List<T> toLists()
        Convert to list
        返回:
        the list
      • stream

        java.util.stream.Stream<T> stream()
        get stream
        返回:
        the stream
      • from

        <R> IFrame<R> from​(java.util.stream.Stream<R> data)
        Convert to other IFrame
      • forEachDo

        IFrame<T> forEachDo​(java.util.function.Consumer<? super T> action)
        Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.
      • defaultScale

        IFrame<T> defaultScale​(int scale)
        Set default decimal places
      • defaultScale

        IFrame<T> defaultScale​(int scale,
                               RoundingMode roundingMode)
        Set default decimal places
      • show

        void show()
        print the 10 row to the console
      • show

        void show​(int n)
        print the n row to the console
      • columns

        List<String> columns()
        Get column headers
      • col

        <R> List<R> col​(java.util.function.Function<T,​R> function)
        Get a column value
      • page

        List<T> page​(int page,
                     int pageSize)
        Get paginated data
        参数:
        page - The current page number is considered as the first page, regardless of whether it is passed as 0 or 1
        pageSize - page size
      • append

        IFrame<T> append​(T t)
        add element to Frame
        参数:
        t - element
      • union

        IFrame<T> union​(IFrame<T> other)
        add other Frame to this
        参数:
        other - other Frame
      • join

        <R,​K> IFrame<R> join​(IFrame<K> other,
                                   JoinOn<T,​K> on,
                                   Join<T,​K,​R> join)
        inner join Frame
        类型参数:
        R - new Frame type
        K - other Frame type
        参数:
        other - other frame
        on - connection conditions
        join - Connection logic
      • join

        <R,​K> IFrame<R> join​(IFrame<K> other,
                                   JoinOn<T,​K> on)
        inner join Frame such as join(IFrame, JoinOn, Join), but the default Join is DefaultJoin, it will automatically map to a new Frame based on the same name
        类型参数:
        R - new Frame type
        K - other Frame type
        参数:
        other - other frame
        on - connection conditions
      • leftJoin

        <R,​K> IFrame<R> leftJoin​(IFrame<K> other,
                                       JoinOn<T,​K> on,
                                       Join<T,​K,​R> join)
        left join Frame if connection conditions false, The callback value K for Join will be null, always keep T
        类型参数:
        R - new Frame type
        K - other Frame type
        参数:
        other - other frame
        on - connection conditions
        join - Connection logic
      • rightJoin

        <R,​K> IFrame<R> rightJoin​(IFrame<K> other,
                                        JoinOn<T,​K> on,
                                        Join<T,​K,​R> join)
        right join Frame if connection conditions false, The callback value T for Join will be null, always keep K
        类型参数:
        R - new Frame type
        K - other Frame type
        参数:
        other - other frame
        on - connection conditions
        join - Connection logic
      • map

        <R> IFrame<R> map​(java.util.function.Function<T,​R> map)
        convert to the new Frame
        类型参数:
        R - the new Frame type
        参数:
        map - convert operation
        返回:
        the new Frame
      • mapPercent

        <R extends NumberIFrame<T> mapPercent​(java.util.function.Function<T,​R> get,
                                                SetFunction<T,​BigDecimal> set,
                                                int scale)
        Percentage convert you can convert the value of a certain field to a percentage, Then assign a value to a certain column through SetFunction
        类型参数:
        R - the percentage field type
        参数:
        get - need percentage convert field
        set - field for storing percentage values
        scale - percentage retain decimal places
      • partition

        IFrame<List<T>> partition​(int n)
        partition cut the matrix into multiple small matrices, with each matrix size n
        参数:
        n - size of each zone
      • addRowNumberCol

        IFrame<FI2<T,​Integer>> addRowNumberCol()
        add sort number to the FI2.c2 field Default sequence number from 1 to frame.length
      • addRowNumberCol

        IFrame<FI2<T,​Integer>> addRowNumberCol​(Sorter<T> sorter)
        Sort by sorter first, then add ordinal columns
        参数:
        sorter - the sorter
      • addRowNumberCol

        IFrame<T> addRowNumberCol​(SetFunction<T,​Integer> set)
        Add a numbered column to a specific column
        参数:
        set - specific column
      • addRowNumberCol

        IFrame<T> addRowNumberCol​(Sorter<T> sorter,
                                  SetFunction<T,​Integer> set)
        Add a numbered column to a specific column
        参数:
        sorter - the sorter
        set - specific column
      • addRankCol

        IFrame<FI2<T,​Integer>> addRankCol​(Sorter<T> sorter)
        Add ranking columns by comparator Ranking logic, the same value means the Ranking is the same. This is different from addRowNumberCol()
        参数:
        sorter - the ranking sorter
      • addRankCol

        IFrame<T> addRankCol​(Sorter<T> sorter,
                             SetFunction<T,​Integer> set)
        Add ranking column to a certain column by Comparator
        参数:
        sorter - the ranking comparator
        set - certain column
      • sortDesc

        IFrame<T> sortDesc​(Comparator<T> comparator)
        Descending order
        参数:
        comparator - comparator
      • sortDesc

        <R extends Comparable<? super R>> IFrame<T> sortDesc​(java.util.function.Function<T,​R> function)
        Descending order by field
        类型参数:
        R - the sort field type
        参数:
        function - sort field
      • sortAsc

        IFrame<T> sortAsc​(Comparator<T> comparator)
        Ascending order
        参数:
        comparator - comparator
      • sortAsc

        <R extends Comparable<R>> IFrame<T> sortAsc​(java.util.function.Function<T,​R> function)
        Ascending order
        参数:
        function - sort field
      • cutFirst

        IFrame<T> cutFirst​(int n)
        Cut the top n element
        参数:
        n - the top n
      • cutLast

        IFrame<T> cutLast​(int n)
        Cut the last n element
        参数:
        n - the last n
      • cutPage

        IFrame<T> cutPage​(int page,
                          int pageSize)
        cut paginated data
        参数:
        page - The current page number is considered as the first page, regardless of whether it is passed as 0 or 1
        pageSize - page size
      • cutFirstRank

        IFrame<T> cutFirstRank​(Sorter<T> sorter,
                               int n)
        Cut the top N rankings data The same value is considered to have the same ranking
        参数:
        sorter - the ranking sorter
        n - the top n
      • head

        T head()
        Get the first element
      • head

        List<T> head​(int n)
        Get the first n elements
      • tail

        T tail()
        Get the last element
      • tail

        List<T> tail​(int n)
        Get the last n elements
      • subList

        List<T> subList​(Integer startIndex,
                        Integer endIndex)
        Get elements within the scope. [startIndex,endIndex]
      • distinct

        IFrame<T> distinct()
        distinct by T value
      • distinct

        <R extends Comparable<R>> IFrame<T> distinct​(java.util.function.Function<T,​R> function)
        distinct by field value
        类型参数:
        R - field value type
        参数:
        function - the field
      • distinct

        <R extends Comparable<R>> IFrame<T> distinct​(Comparator<T> comparator)
        distinct by comparator
        参数:
        comparator - the comparator
      • countDistinct

        <R extends Comparable<R>> long countDistinct​(java.util.function.Function<T,​R> function)
        Calculate the quantity after deduplication
      • countDistinct

        long countDistinct​(Comparator<T> comparator)
        Calculate the quantity after deduplication
      • where

        IFrame<T> where​(java.util.function.Predicate<? super T> predicate)
        filter by predicate
        参数:
        predicate - the predicate
      • whereNull

        <R> IFrame<T> whereNull​(java.util.function.Function<T,​R> function)
        Filter field values that are null, If it is string compatible, null and '' situations
        类型参数:
        R - the filter field type
        参数:
        function - the filter field
      • whereNotNull

        <R> IFrame<T> whereNotNull​(java.util.function.Function<T,​R> function)
        Filter field values that are not null,If it is string compatible, null and '' situations
        类型参数:
        R - the filter field type
        参数:
        function - the filter field
      • whereBetween

        <R extends Comparable<R>> IFrame<T> whereBetween​(java.util.function.Function<T,​R> function,
                                                         R start,
                                                         R end)
        Screening within the interval,front closed and back closed. [start,end] [start,end]
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereBetweenN

        <R extends Comparable<R>> IFrame<T> whereBetweenN​(java.util.function.Function<T,​R> function,
                                                          R start,
                                                          R end)
        Screening within the interval , front open and back open (start,end)
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereBetweenR

        <R extends Comparable<R>> IFrame<T> whereBetweenR​(java.util.function.Function<T,​R> function,
                                                          R start,
                                                          R end)
        Screening within the interval , front open and back close (start,end]
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereBetweenL

        <R extends Comparable<R>> IFrame<T> whereBetweenL​(java.util.function.Function<T,​R> function,
                                                          R start,
                                                          R end)
        Screening within the interval , front close and back open [start,end)
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereNotBetween

        <R extends Comparable<R>> IFrame<T> whereNotBetween​(java.util.function.Function<T,​R> function,
                                                            R start,
                                                            R end)
        Out of range screening, (front closed and back closed) [start,end]
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereNotBetweenN

        <R extends Comparable<R>> IFrame<T> whereNotBetweenN​(java.util.function.Function<T,​R> function,
                                                             R start,
                                                             R end)
        Out of range screening, (front open and back open) (start,end)
        参数:
        function - the filter field
        start - start value
        end - end value
      • whereIn

        <R> IFrame<T> whereIn​(java.util.function.Function<T,​R> function,
                              List<R> list)
        The query value is within the specified range
        参数:
        function - the filter field
        list - specified range
      • whereNotIn

        <R> IFrame<T> whereNotIn​(java.util.function.Function<T,​R> function,
                                 List<R> list)
        The query value is outside the specified range
        参数:
        function - the filter field
        list - specified range
      • whereTrue

        IFrame<T> whereTrue​(java.util.function.Predicate<T> predicate)
        filter true by predicate
      • whereNotTrue

        IFrame<T> whereNotTrue​(java.util.function.Predicate<T> predicate)
        filter not true by predicate
      • whereEq

        <R> IFrame<T> whereEq​(java.util.function.Function<T,​R> function,
                              R value)
        Filter equals
        参数:
        function - the field
        value - need value
      • whereNotEq

        <R> IFrame<T> whereNotEq​(java.util.function.Function<T,​R> function,
                                 R value)
        Filter not equals
        参数:
        function - the field
        value - not need value
      • whereGt

        <R extends Comparable<R>> IFrame<T> whereGt​(java.util.function.Function<T,​R> function,
                                                    R value)
        Filter Greater than value
        参数:
        function - the field
        value - not need value
      • whereGe

        <R extends Comparable<R>> IFrame<T> whereGe​(java.util.function.Function<T,​R> function,
                                                    R value)
        Filter Greater than or equal to
        参数:
        function - the field
        value - not need value
      • whereLt

        <R extends Comparable<R>> IFrame<T> whereLt​(java.util.function.Function<T,​R> function,
                                                    R value)
        Filter LESS than value
        参数:
        function - the field
        value - not need value
      • whereLe

        <R extends Comparable<R>> IFrame<T> whereLe​(java.util.function.Function<T,​R> function,
                                                    R value)
        Filter less than or equal to
        参数:
        function - the field
        value - not need value
      • whereLike

        <R> IFrame<T> whereLike​(java.util.function.Function<T,​R> function,
                                R value)
        Fuzzy query contains specified values
        参数:
        function - the field
        value - query value
      • whereNotLike

        <R> IFrame<T> whereNotLike​(java.util.function.Function<T,​R> function,
                                   R value)
        Fuzzy query not contains specified values
        参数:
        function - the field
        value - query value
      • whereLikeLeft

        <R> IFrame<T> whereLikeLeft​(java.util.function.Function<T,​R> function,
                                    R value)
        prefix fuzzy query contains specified values
        参数:
        function - the field
        value - query value
      • whereLikeRight

        <R> IFrame<T> whereLikeRight​(java.util.function.Function<T,​R> function,
                                     R value)
        suffix fuzzy query contains specified values
        参数:
        function - the field
        value - query value
      • sum

        <R> BigDecimal sum​(java.util.function.Function<T,​R> function)
        Sum the values of the field
        参数:
        function - the field
      • avg

        <R> BigDecimal avg​(java.util.function.Function<T,​R> function)
        average the values of the field
        参数:
        function - the field
      • maxMin

        <R extends Comparable<? super R>> MaxMin<T> maxMin​(java.util.function.Function<T,​R> function)
        Finding the maximum and minimum element
        参数:
        function - the field
      • maxMinValue

        <R extends Comparable<? super R>> MaxMin<R> maxMinValue​(java.util.function.Function<T,​R> function)
        Finding the maximum and minimum value
        参数:
        function - the field
      • max

        <R extends Comparable<R>> T max​(java.util.function.Function<T,​R> function)
        Finding the maximum element
        参数:
        function - the field
      • maxValue

        <R extends Comparable<? super R>> R maxValue​(java.util.function.Function<T,​R> function)
        Finding the maximum value
        参数:
        function - the field
      • minValue

        <R extends Comparable<? super R>> R minValue​(java.util.function.Function<T,​R> function)
        Finding the minimum value
        参数:
        function - the field
      • min

        <R extends Comparable<R>> T min​(java.util.function.Function<T,​R> function)
        Finding the minimum element
        参数:
        function - the field
      • count

        long count()
        get row count
      • group

        <K> IFrame<FI2<K,​List<T>>> group​(java.util.function.Function<T,​K> key)
        Group list
        参数:
        key - group field
      • groupBySum

        <K,​R extends NumberIFrame<FI2<K,​BigDecimal>> groupBySum​(java.util.function.Function<T,​K> key,
                                                                              NumberFunction<T,​R> value)
        Group summation
        参数:
        key - group field
        value - Aggregated field
      • groupBySum

        <K,​J,​R extends NumberIFrame<FI3<K,​J,​BigDecimal>> groupBySum​(java.util.function.Function<T,​K> key,
                                                                                              java.util.function.Function<T,​J> key2,
                                                                                              NumberFunction<T,​R> value)
        Group summation
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupBySum

        <K,​J,​H,​R extends NumberIFrame<FI4<K,​J,​H,​BigDecimal>> groupBySum​(java.util.function.Function<T,​K> key,
                                                                                                              java.util.function.Function<T,​J> key2,
                                                                                                              java.util.function.Function<T,​H> key3,
                                                                                                              NumberFunction<T,​R> value)
        Group summation
        参数:
        key - group field
        key2 - secondary level group field
        key3 - third level group field
        value - Aggregated field
      • groupByCount

        <K> IFrame<FI2<K,​Long>> groupByCount​(java.util.function.Function<T,​K> key)
        Group count
        参数:
        key - group field
      • groupByCount

        <K,​J> IFrame<FI3<K,​J,​Long>> groupByCount​(java.util.function.Function<T,​K> key,
                                                                   java.util.function.Function<T,​J> key2)
        Group count
        参数:
        key - group field
        key2 - secondary level group field
      • groupByCount

        <K,​J,​H> IFrame<FI4<K,​J,​H,​Long>> groupByCount​(java.util.function.Function<T,​K> key,
                                                                                   java.util.function.Function<T,​J> key2,
                                                                                   java.util.function.Function<T,​H> key3)
        Group count
        参数:
        key - group field
        key2 - secondary level group field
        key3 - third level group field
      • groupBySumCount

        <K,​R extends NumberIFrame<FI3<K,​BigDecimal,​Long>> groupBySumCount​(java.util.function.Function<T,​K> key,
                                                                                              NumberFunction<T,​R> value)
        Group sum and count together
        参数:
        key - group field
        value - Aggregated field
        返回:
        FItem3(key, Sum, Count)
      • groupBySumCount

        <K,​J,​R extends NumberIFrame<FI4<K,​J,​BigDecimal,​Long>> groupBySumCount​(java.util.function.Function<T,​K> key,
                                                                                                              java.util.function.Function<T,​J> key2,
                                                                                                              NumberFunction<T,​R> value)
        Group sum and count together
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
        返回:
        FItem4(key, ke2,Sum, Count)
      • groupByAvg

        <K,​R extends NumberIFrame<FI2<K,​BigDecimal>> groupByAvg​(java.util.function.Function<T,​K> key,
                                                                              NumberFunction<T,​R> value)
        Group average
        参数:
        key - group field
        value - Aggregated field
      • groupByAvg

        <K,​J,​R extends NumberIFrame<FI3<K,​J,​BigDecimal>> groupByAvg​(java.util.function.Function<T,​K> key,
                                                                                              java.util.function.Function<T,​J> key2,
                                                                                              NumberFunction<T,​R> value)
        Group average
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByAvg

        <K,​J,​H,​R extends NumberIFrame<FI4<K,​J,​H,​BigDecimal>> groupByAvg​(java.util.function.Function<T,​K> key,
                                                                                                              java.util.function.Function<T,​J> key2,
                                                                                                              java.util.function.Function<T,​H> key3,
                                                                                                              NumberFunction<T,​R> value)
        Group average
        参数:
        key - group field
        key2 - secondary level group field
        key3 - third level group field
        value - Aggregated field
      • groupByMax

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​T>> groupByMax​(java.util.function.Function<T,​K> key,
                                                                                    java.util.function.Function<T,​V> value)
        Group max
        参数:
        key - group field
        value - Aggregated field
      • groupByMax

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​T>> groupByMax​(java.util.function.Function<T,​K> key,
                                                                                                    java.util.function.Function<T,​J> key2,
                                                                                                    java.util.function.Function<T,​V> value)
        Group max
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByMaxValue

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​V>> groupByMaxValue​(java.util.function.Function<T,​K> key,
                                                                                         java.util.function.Function<T,​V> value)
        Group max value
        参数:
        key - group field
        value - Aggregated field
      • groupByMaxValue

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​V>> groupByMaxValue​(java.util.function.Function<T,​K> key,
                                                                                                         java.util.function.Function<T,​J> key2,
                                                                                                         java.util.function.Function<T,​V> value)
        Group max value
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByMin

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​T>> groupByMin​(java.util.function.Function<T,​K> key,
                                                                                    java.util.function.Function<T,​V> value)
        Group min
        参数:
        key - group field
        value - Aggregated field
      • groupByMin

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​T>> groupByMin​(java.util.function.Function<T,​K> key,
                                                                                                    java.util.function.Function<T,​J> key2,
                                                                                                    java.util.function.Function<T,​V> value)
        Group min
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByMinValue

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​V>> groupByMinValue​(java.util.function.Function<T,​K> key,
                                                                                         java.util.function.Function<T,​V> value)
        Group min value
        参数:
        key - group field
        value - Aggregated field
      • groupByMinValue

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​V>> groupByMinValue​(java.util.function.Function<T,​K> key,
                                                                                                         java.util.function.Function<T,​J> key2,
                                                                                                         java.util.function.Function<T,​V> value)
        Group min value
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByMaxMinValue

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​MaxMin<V>>> groupByMaxMinValue​(java.util.function.Function<T,​K> key,
                                                                                                    java.util.function.Function<T,​V> value)
        Group max and min value
        参数:
        key - group field
        value - Aggregated field
      • groupByMaxMinValue

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​MaxMin<V>>> groupByMaxMinValue​(java.util.function.Function<T,​K> key,
                                                                                                                    java.util.function.Function<T,​J> key2,
                                                                                                                    java.util.function.Function<T,​V> value)
        Group max and min value
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • groupByMaxMin

        <K,​V extends Comparable<? super V>> IFrame<FI2<K,​MaxMin<T>>> groupByMaxMin​(java.util.function.Function<T,​K> key,
                                                                                               java.util.function.Function<T,​V> value)
        Group max and min element
        参数:
        key - group field
        value - Aggregated field
      • groupByMaxMin

        <K,​J,​V extends Comparable<? super V>> IFrame<FI3<K,​J,​MaxMin<T>>> groupByMaxMin​(java.util.function.Function<T,​K> key,
                                                                                                               java.util.function.Function<T,​J> key2,
                                                                                                               java.util.function.Function<T,​V> value)
        Group max and min element
        参数:
        key - group field
        key2 - secondary level group field
        value - Aggregated field
      • replenish

        <C> IFrame<T> replenish​(java.util.function.Function<T,​C> collectDim,
                                List<C> allDim,
                                java.util.function.Function<C,​T> getEmptyObject)
        Summarize all collectDim values, calculate the difference between them, and then add the missing difference to the Frame through getEmptyObject
      • replenish

        <G,​C> IFrame<T> replenish​(java.util.function.Function<T,​G> groupDim,
                                        java.util.function.Function<T,​C> collectDim,
                                        List<C> allDim,
                                        ReplenishFunction<G,​C,​T> getEmptyObject)
        Calculate the difference in groups and then add the difference to that group according to the groupDim dimension, and then summarize all collectDim fields within each group After summarizing, calculate the difference sets with allAbscissa, which are the entries that need to be supplemented. Then, generate empty objects according to the ReplenishFunction logic and add them to the group
        类型参数:
        G - The type of grouping
        C - type of collection within the group The set supplemented by @ return
        参数:
        groupDim - Dimension fields for grouping
        collectDim - Data fields collected within the group
        allDim - All dimensions that need to be displayed within the group
        getEmptyObject - Logic for generating empty objects
      • replenish

        <G,​C> IFrame<T> replenish​(java.util.function.Function<T,​G> groupDim,
                                        java.util.function.Function<T,​C> collectDim,
                                        ReplenishFunction<G,​C,​T> getEmptyObject)
        such as replenish(Function, Function, List, ReplenishFunction), but can not Specify allDim, will auto generate allDim, The default allDim is the value of all collectDim fields in the set
        类型参数:
        G - The type of grouping
        C - type of collection within the group
        参数:
        groupDim - Dimension fields for grouping
        collectDim - Data fields collected within the group
        getEmptyObject - Logic for generating empty objects