jetbrains.buildServer.vcs.utils
Class DateVersionComparator

java.lang.Object
  extended by jetbrains.buildServer.vcs.utils.DateVersionComparator
All Implemented Interfaces:
java.util.Comparator<java.lang.String>
Direct Known Subclasses:
VcsSupportUtil.DateVersionComparator

public class DateVersionComparator
extends java.lang.Object
implements java.util.Comparator<java.lang.String>

Default implementation to compare date-based versions


Constructor Summary
DateVersionComparator(java.text.SimpleDateFormat simpleDateFormat)
          Creates default date comparator.
 
Method Summary
 int compare(java.lang.String o1, java.lang.String o2)
           
 
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

DateVersionComparator

public DateVersionComparator(@NotNull
                             java.text.SimpleDateFormat simpleDateFormat)
Creates default date comparator.

Parameters:
simpleDateFormat - format to create date from the version string.
Method Detail

compare

public int compare(java.lang.String o1,
                   java.lang.String o2)
Specified by:
compare in interface java.util.Comparator<java.lang.String>