public final class SimpleVersion extends Object implements Comparable<SimpleVersion>, Serializable
A version should formatted like this a.b with :
Versioning
| Constructor and Description |
|---|
SimpleVersion(Integer major,
Integer medium)
Build a new instance of SimpleVersion.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(SimpleVersion version) |
boolean |
equals(Object obj) |
Integer |
getMajor() |
Integer |
getMedium() |
int |
hashCode() |
boolean |
isBackwardCompatible(SimpleVersion version)
Same major and classifier.
|
static SimpleVersion |
parse(String version)
Parse string representation.
|
String |
toString() |
public SimpleVersion(Integer major, Integer medium) throws NullPointerException
major - major version numebrmedium - optional medium version numberNullPointerException - if major is nullpublic static final SimpleVersion parse(String version) throws IllegalArgumentException, NumberFormatException
version - IllegalFormatException - if version is not a Version with separator.NumberFormatException - if major, medium are not number.IllegalArgumentExceptionpublic int compareTo(SimpleVersion version)
compareTo in interface Comparable<SimpleVersion>public boolean isBackwardCompatible(SimpleVersion version)
version - public Integer getMajor()
public Integer getMedium()
Copyright © 2010–2014 Intelligents-ia. All rights reserved.