ice.util
Class MajorMinorVersionComparator
java.lang.Object
ice.util.MajorMinorVersionComparator
- All Implemented Interfaces:
- Comparator
- Direct Known Subclasses:
- FullVersionComparator, MajorMinorReleaseVersionComparator
- public class MajorMinorVersionComparator
- extends Object
- implements Comparator
This Comparator instance performs a comparison between the version values
defined in the AbstractVersion Base class, comparing the first two
parts of the version specification.
|
Field Summary |
protected int |
comparisonLength
The default comparison length for this base class defaults to two. |
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compare two Version instances, comparing only the
first two Version specification parts, which corresponds to the
Major and minor versions in most version specifications. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
comparisonLength
protected int comparisonLength
- The default comparison length for this base class defaults to two.
MajorMinorVersionComparator
public MajorMinorVersionComparator()
compare
public int compare(Object o1,
Object o2)
- Compare two
Version instances, comparing only the
first two Version specification parts, which corresponds to the
Major and minor versions in most version specifications. Subclasses
of this comparator can alter the length of the comparison by setting
comparisonLength
before calling this method.
- Specified by:
compare in interface Comparator
- Parameters:
o1 - The first argumento2 - The second argument
- Returns:
- true if o1 is at least equal to or greater than o2,
through the MAJOR_PART + MINOR_PART of the version specification