org.dellroad.stuff.spring
Class BeanNameComparator

java.lang.Object
  extended by org.dellroad.stuff.spring.BeanNameComparator
All Implemented Interfaces:
Comparator<String>

public class BeanNameComparator
extends Object
implements Comparator<String>

A Comparator that orders Spring bean names in the same order as the corresponding beans appear in a ListableBeanFactory.

Names that are not present in the configured ListableBeanFactory cause an exception.


Constructor Summary
BeanNameComparator(ListableBeanFactory beanFactory)
           
 
Method Summary
 int compare(String name1, String name2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

BeanNameComparator

public BeanNameComparator(ListableBeanFactory beanFactory)
Method Detail

compare

public int compare(String name1,
                   String name2)
Specified by:
compare in interface Comparator<String>