FreeHEP API
Version current

org.freehep.util
Class VersionComparator

java.lang.Object
  extended byorg.freehep.util.VersionComparator
All Implemented Interfaces:
Comparator

public class VersionComparator
extends Object
implements Comparator

Version:
$Id: VersionComparator.java,v 1.3 2004/05/21 20:22:48 tonyj Exp $
Author:
Tony Johnson
Source Code:
VersionComparator.java

Constructor Summary
VersionComparator()
           
 
Method Summary
 int compare(Object obj, Object obj1)
           
 int versionNumberCompare(String v1, String v2)
          Compares two version numbers of the form 1.2.3.4
 
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

VersionComparator

public VersionComparator()
Method Detail

versionNumberCompare

public int versionNumberCompare(String v1,
                                String v2)
                         throws NumberFormatException
Compares two version numbers of the form 1.2.3.4

Returns:
>0 if v1>v2, <0 if v1Throws:
NumberFormatException

compare

public int compare(Object obj,
                   Object obj1)
Specified by:
compare in interface Comparator

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.