BestSolution.at public p2 repository
ColumnComparator
at.bestsolution.framework.grid

Interface ColumnComparator<R,C>

  • Type Parameters:
    R - the row type
    C - the cell value type
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.


    @FunctionalInterface
    public interface ColumnComparator<R,C>
    Compare cell values
    Since:
    1.0
    • Method Detail

      • compare

        int compare(R r1,
                    C c1,
                    R r2,
                    C c2)
        Compare the cell value
        Parameters:
        r1 - the row of value 1
        c1 - the cell value 1
        r2 - the row of value 2
        c2 - the cell value 2
        Returns:
        a negative integer, zero, or a positive integer as c1 is less than, equal to, or greater than c2.
      • create

        static <R,C> ColumnComparator<R,C> create(@NonNull java.util.Comparator<C> c)
        Create a comparator from a default Comparator
        Type Parameters:
        R - the row type
        C - the cell type
        Parameters:
        c - the default comparator
        Returns:
        a column comparator