com.atlassian.bamboo.upgrader
Class BuildNumberComparator

java.lang.Object
  extended by com.atlassian.bamboo.upgrader.BuildNumberComparator
All Implemented Interfaces:
java.util.Comparator<java.lang.String>

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


Constructor Summary
BuildNumberComparator()
           
 
Method Summary
 int compare(java.lang.String o1, java.lang.String o2)
          Compares two string representation of build numbers.
 
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

BuildNumberComparator

public BuildNumberComparator()
Method Detail

compare

public int compare(java.lang.String o1,
                   java.lang.String o2)
Compares two string representation of build numbers. These strings must be parsable to a number.

Specified by:
compare in interface java.util.Comparator<java.lang.String>
Parameters:
o1 - First build number
o2 - Second build number
Returns:
Underlying number comparison notation - 1 = greater than, 0 = equals, -1 = less than.


Copyright © 2010 Atlassian. All Rights Reserved.