List of usage examples for org.springframework.core OrderComparator INSTANCE
OrderComparator INSTANCE
To view the source code for org.springframework.core OrderComparator INSTANCE.
Click Source Link
From source file:edu.mayo.cts2.framework.plugin.service.lexevs.uri.DelegatingUriHandler.java
@Override public void afterPropertiesSet() throws Exception { Collections.sort(this.delegateUriHandlers, OrderComparator.INSTANCE); }
From source file:com.teradata.benchto.driver.listeners.benchmark.BenchmarkStatusReporter.java
@Autowired public BenchmarkStatusReporter(List<BenchmarkExecutionListener> executionListeners) { this.executionListeners = ImmutableList.copyOf(Ordering.<Ordered>from(OrderComparator.INSTANCE::compare) // HACK: listeners have to be sorted to provide tests determinism .compound(Ordering.usingToString()).sortedCopy(executionListeners)); }
From source file:com.googlecode.shutdownlistener.spring.ShutdownHandlerBean.java
@Override protected void sortShutdownListeners(List<ShutdownListener> shutdownListeners) { Collections.sort(shutdownListeners, OrderComparator.INSTANCE); }
From source file:org.arrow.runtime.execution.listener.BpmnNodeListenerComparator.java
/** * Compares the order of the given {@link ExecutionListener} instances. * //from w ww.j a v a2 s . c o m * @param o1 the first execution listener instance * @param o2 the second execution listener instance * @return int */ private int compareOrder(Object o1, Object o2) { return OrderComparator.INSTANCE.compare(o1, o2); }
From source file:edu.mayo.cts2.framework.plugin.service.lexevs.service.entity.DelegatingEntityQueryService.java
@Autowired public void setDelegates(List<DelegateEntityQueryService> delegates) { Collections.sort(delegates, OrderComparator.INSTANCE); this.delegates = delegates; }
From source file:org.apereo.portal.portlet.container.properties.RequestPropertiesManagerBroker.java
@Autowired public void setPropertiesManagers(Collection<? extends IRequestPropertiesManager> propertiesManagers) { this.propertiesManagers = new ArrayList<IRequestPropertiesManager>(propertiesManagers); Collections.sort(this.propertiesManagers, OrderComparator.INSTANCE); }
From source file:org.springframework.context.support.PostProcessorRegistrationDelegate.java
private static void sortPostProcessors(List<?> postProcessors, ConfigurableListableBeanFactory beanFactory) { Comparator<Object> comparatorToUse = null; if (beanFactory instanceof DefaultListableBeanFactory) { comparatorToUse = ((DefaultListableBeanFactory) beanFactory).getDependencyComparator(); }/*from w w w . ja v a 2 s . c o m*/ if (comparatorToUse == null) { comparatorToUse = OrderComparator.INSTANCE; } Collections.sort(postProcessors, comparatorToUse); }