uk.co.petertribble.pkgview
Class PatchComparator

java.lang.Object
  extended by uk.co.petertribble.pkgview.PatchComparator
All Implemented Interfaces:
java.util.Comparator<SolarisPatch>

public class PatchComparator
extends java.lang.Object
implements java.util.Comparator<SolarisPatch>

Sorts Solaris patch numbers. These are of the form ######-## comprising a 6-digit patch number and a 2-digit revision. The patch number is first compared, the revision is only compared if the patch number is the same.


Method Summary
 int compare(SolarisPatch p1, SolarisPatch p2)
           
static PatchComparator getInstance()
           
 
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
 

Method Detail

getInstance

public static PatchComparator getInstance()

compare

public int compare(SolarisPatch p1,
                   SolarisPatch p2)
Specified by:
compare in interface java.util.Comparator<SolarisPatch>