org.jenkinsci.maven.plugins.hpi

## Class VersionNumber

- java.lang.Object
- - org.jenkinsci.maven.plugins.hpi.VersionNumber

All Implemented Interfaces:
  java.lang.Comparable<VersionNumber>

    public class VersionNumber
    extends java.lang.Object
    implements java.lang.Comparable<VersionNumber>

Immutable representation of a dot or '-'-separated digits (such as "1.0.1" or "1.0-52"). `VersionNumber`s are `Comparable`.

## Special tokens

We allow a component to be not just a number, but also "ea", "ea1", "ea2". "ea" is treated as "ea0", and eaN < M for any M > 0.

'*' is also allowed as a component, and '*' > M for any M > 0.

'SNAPSHOT' is also allowed as a component, and "N.SNAPSHOT" is interpreted as "N-1.*"

     2.0.* > 2.0.1 > 2.0.1-SNAPSHOT > 2.0.0.99 > 2.0.0 > 2.0.ea > 2.0

Since:
  1.139
Author:
  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)

### Constructor Summary

Constructors
Constructor and Description
`VersionNumber(java.lang.String num)` Parses a string like "1.0.2" into the version number.

### Method Summary

Methods
`int` `compareTo(VersionNumber rhs)`
`boolean` `equals(java.lang.Object o)`
`int` `hashCode()`
`boolean` `isNewerThan(VersionNumber rhs)`
`boolean` `isOlderThan(VersionNumber rhs)`
`java.lang.String` `toString()`

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

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VersionNumber

    public VersionNumber(java.lang.String num)

Parses a string like "1.0.2" into the version number.

Throws:
  `java.lang.IllegalArgumentException` - if the parsing fails.

### Method Detail

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### isOlderThan

    public boolean isOlderThan(VersionNumber rhs)

#### isNewerThan

    public boolean isNewerThan(VersionNumber rhs)

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### compareTo

    public int compareTo(VersionNumber rhs)

Specified by:
  `compareTo` in interface `java.lang.Comparable<VersionNumber>`