public class Version extends Object implements Comparable<Version>
Constructor and Description |
---|
Version()
Constructor.
|
Version(String value)
Constructor.
|
Version(String value,
String splitDelim)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Version o)
Implement the comparable interface so the the extended device classes will be sorted by version (low to high).
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isGreater(Version targetVersion)
Returns true if this version is greater than the passed in version.
|
boolean |
isGreaterOrEqual(Version targetVersion)
Returns true if this version is greater than or equal the passed in version.
|
boolean |
isLess(Version targetVersion)
Returns true if this version is less than the passed in version.
|
boolean |
isLessOrEqual(Version targetVersion)
Returns true if this version is less than or equal the passed in version.
|
String |
toString() |
public Version()
public Version(String value)
value
- version stringpublic Version(String value, String splitDelim)
value
- version stringsplitDelim
- regular expression delimiter; see String.split(String)
public boolean isGreater(Version targetVersion)
targetVersion
- version in object formpublic boolean isGreaterOrEqual(Version targetVersion)
targetVersion
- version in object formpublic boolean isLess(Version targetVersion)
targetVersion
- version in object formpublic boolean isLessOrEqual(Version targetVersion)
targetVersion
- version in object formpublic int compareTo(Version o)
compareTo
in interface Comparable<Version>
o
- the object to be compared.Copyright © 2015. All Rights Reserved.