org.openmrs.util
Class MetadataComparator

java.lang.Object
  extended by org.openmrs.util.MetadataComparator
All Implemented Interfaces:
java.util.Comparator<OpenmrsMetadata>

public class MetadataComparator
extends java.lang.Object
implements java.util.Comparator<OpenmrsMetadata>

A comparator that sorts first based on non-retired, and second based on name. (Locale is currently not used, but will be when we add the ability to localize metadata.)

Since:
1.7

Constructor Summary
MetadataComparator(java.util.Locale locale)
           
 
Method Summary
 int compare(OpenmrsMetadata left, OpenmrsMetadata right)
           
 
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

MetadataComparator

public MetadataComparator(java.util.Locale locale)
Parameters:
locale -
Method Detail

compare

public int compare(OpenmrsMetadata left,
                   OpenmrsMetadata right)
Specified by:
compare in interface java.util.Comparator<OpenmrsMetadata>
See Also:
Comparator.compare(java.lang.Object, java.lang.Object)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change