VersionUtil (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.util, class: VersionUtil

Package org.apache.hadoop.util

# Class VersionUtil

java.lang.Object
org.apache.hadoop.util.VersionUtil

@Private public abstract class VersionUtil extends Object
A wrapper class to maven's ComparableVersion class, to comply with maven's version name string convention

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VersionUtil()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `compareVersions(String version1, String version2)`
  Compares two version name strings using maven's ComparableVersion class.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### VersionUtil

    public VersionUtil()

- ## Method Details

  - ### compareVersions

    public static int compareVersions(String version1, String version2)
    Compares two version name strings using maven's ComparableVersion class.
    Parameters:
      `version1` - the first version to compare
      `version2` - the second version to compare
    Returns:
      a negative integer if version1 precedes version2, a positive integer if version2 precedes version1, and 0 if and only if the two versions are equal.