src/main/java/de/javagl/geom/ConvexHull.java
/**
     * Creates a comparator that combines the given comparators. They are
     * applied in the given order, and if any of them returns a 
     * non-<code>0</code> result for a pair of values, then
     * this result is returned. Otherwise, the comparator returns 
     * <code>0</code>.
     *  
     * @param comparators The delegate comparators
     * @return The composed comparator
     */
Creates a comparator that combines the given comparators. They are
applied in the given order, and if any of them returns a
non-0 result for a pair of values, then
this result is returned. Otherwise, the comparator returns
0.

@param comparators The delegate comparators
@return The composed comparator
Creates a comparator that combines the given comparators . They are applied in the given order and if any of them returns a non - 0 result for a pair of values then this result is returned . Otherwise the comparator returns 0 . @param comparators The delegate comparators @return The composed comparator
@SafeVarargs
    private static <T> Comparator<T> composeComparators(
        Comparator<? super T> ... comparators)
    {
        return new Comparator<T>()
        {
            @Override
            public int compare(T t0, T t1)
            {
                for (Comparator<? super T> comparator : comparators)
                {
                    int result = comparator.compare(t0, t1);
                    if (result != 0)
                    {
                        return result;
                    }
                }
                return 0;
            }
        };
    }
@ SafeVarargs private static < T > Comparator < T > composeComparators ( Comparator < ? super T > ... comparators ) { return new Comparator < T > ( ) { @ Override public int compare ( T t0 , T t1 ) { for ( Comparator < ? super T > comparator : comparators ) { int result = comparator . compare ( t0 , t1 ) ; if ( result != 0 ) { return result ; } } return 0 ; } } ; }
Creates a comparator that combines the given comparators.
Creates a comparator that combines the given comparators .