public final class VersionNumber extends Object implements Comparable<VersionNumber>
The dotted number will always be "normalized", meaning that all trailing zeroes will be removed all of the time. In comparisons missing trailing numbers will behave as zeroes.
| Constructor and Description |
|---|
VersionNumber(String prefix,
int[] version,
String suffix) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(VersionNumber o) |
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isDevelopment()
Return T if the version number starts with 99 or higher, as an indication this is a development thing.
|
boolean |
isSameBase(VersionNumber o)
Returns T if both numbers have the same prefix and suffix.
|
static void |
main(String[] args) |
static VersionNumber |
parse(String input)
Parses a version number in the format: pppx.x.xsss, where ppp is any non-numeric string, x.x.x is a repeated set of numbers separated by dots, and
sss is another non-numeric string.
|
String |
toString() |
String |
toString(int mindigits) |
public String toString(int mindigits)
public static VersionNumber parse(String input) throws InvalidVersionNumberException
input - InvalidVersionNumberExceptionpublic int compareTo(VersionNumber o)
compareTo in interface Comparable<VersionNumber>public boolean isSameBase(VersionNumber o)
o - public boolean isDevelopment()
public static void main(String[] args)
Copyright © 2017 etc.to. All rights reserved.