Code example for Comparator

Methods: compare

0
    public ReverseComparator(Comparator<T> delegate){
        this.delegate = delegate;
    } 
 
    public int compare(T o1, T o2){
        return -delegate.compare(o1, o2);
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE