Example usage for org.springframework.util.comparator InvertibleComparator InvertibleComparator

List of usage examples for org.springframework.util.comparator InvertibleComparator InvertibleComparator

Introduction

In this page you can find the example usage for org.springframework.util.comparator InvertibleComparator InvertibleComparator.

Prototype

public InvertibleComparator(Comparator<T> comparator, boolean ascending) 

Source Link

Document

Create an InvertibleComparator that sorts based on the provided order.

Usage

From source file:org.synyx.hera.core.OrderAwarePluginRegistry.java

/**
 * Returns a new {@link OrderAwarePluginRegistry} with the order of the
 * plugins reverted.//from   ww w . j a  v a 2 s . c o  m
 * 
 * @return
 */
@SuppressWarnings("unchecked")
public OrderAwarePluginRegistry<T, S> reverse() {

    return create(plugins, new InvertibleComparator(comparator, false));
}