|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knuth.chkupdate.Version
public class Version
Used to compare two version and see which one is the newer one.
Field Summary | |
---|---|
private java.lang.String |
CHAR_REGEX
RegEx used to parse the Version-String |
private int[] |
numbers
Splited version-numbers |
private java.lang.String |
SPLIT_REGEX
The RegEx used to split the Version-String up |
Constructor Summary | |
---|---|
Version(java.lang.String version_str)
Creates a new Version-Object by parsing the given Version String. |
Method Summary | |
---|---|
boolean |
isNewerThen(Version version)
Checks if this version is higher (newer) then the given one. |
private void |
parseVersion(java.lang.String version_str)
Splits up the version-string by the "." |
java.lang.String |
toString()
Returns the version-String for this "Version"- Object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final java.lang.String CHAR_REGEX
private final java.lang.String SPLIT_REGEX
private int[] numbers
Constructor Detail |
---|
public Version(java.lang.String version_str)
version_str
- The Version-String to parse.Method Detail |
---|
private void parseVersion(java.lang.String version_str)
version_str
- The version-String to parse.public boolean isNewerThen(Version version)
version
- The Version to check against this
Version.
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |