public class VersionVO extends Object implements Comparable<VersionVO>, Serializable
major.minor[.revision][_state[version]][-name]
Constructor and Description |
---|
VersionVO(Integer major,
Integer minor,
Integer revision,
VersionState state,
Integer stateVersion,
String name)
Constructor og VersionVO.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(VersionVO o) |
boolean |
equals(Object obj) |
Integer |
getMajor()
The major number.
|
Integer |
getMinor()
The minor number.
|
String |
getName()
The version name
|
static List<String> |
getRestrictions()
Gets the restrictions of the VersionVO
|
Integer |
getRevision()
The revision number.
|
VersionState |
getState()
The version state.
|
Integer |
getStateVersion()
The state version.
|
int |
hashCode() |
boolean |
isGreaterVersionThan(VersionVO vo)
Determines if this VersionVO is greater than another Version.
|
boolean |
isLessVersionThan(VersionVO vo)
Determines if this VersionVO is less than another Version.
|
boolean |
isSameVersionAs(VersionVO vo)
Compares to VersionVO to determine if they are the same version.
|
static VersionVO |
parse(String value)
Parse a String to a VersionVO
|
String |
toString() |
public VersionVO(Integer major, Integer minor, Integer revision, VersionState state, Integer stateVersion, String name)
major
- the major version number.minor
- the minor version number.revision
- the revision number.state
- the version state.stateVersion
- the state version number.name
- the version name.public static List<String> getRestrictions()
public static VersionVO parse(String value) throws PropertyException
value
- the String value.PropertyException
- if the String could not be parsed.public int compareTo(VersionVO o)
compareTo
in interface Comparable<VersionVO>
public boolean isGreaterVersionThan(VersionVO vo)
vo
- another VersionVOtrue
if "this" VersionVO instance is "greater" than another VersionVO, otherwise false
.public boolean isLessVersionThan(VersionVO vo)
vo
- another VersionVOtrue
if "this" VersionVO instance is "is" than another VersionVO, otherwise false
.public boolean isSameVersionAs(VersionVO vo)
vo
- another VersionVO.true
if they are the same version, otherwise false
.public Integer getMajor()
public Integer getMinor()
public Integer getRevision()
public VersionState getState()
public Integer getStateVersion()
public String getName()