This commit is contained in:
6543
2020-05-08 20:53:49 +02:00
parent 580a176682
commit 7885555521

View File

@ -22,9 +22,8 @@ public class Version {
/**
* regex used to identify the type of version
**/
final Pattern pattern_major_minor_patch_release = Pattern.compile("^[v,V]?(\\d+)\\.(\\d+)\\.(\\d+)");
final Pattern pattern_dev_release = Pattern.compile("^[v,V]?(\\d).(\\d+).(\\d+)(\\D)(.+)");
final private Pattern pattern_major_minor_patch_release = Pattern.compile("^[v,V]?(\\d+)\\.(\\d+)\\.(\\d+)");
final private Pattern pattern_dev_release = Pattern.compile("^[v,V]?(\\d).(\\d+).(\\d+)(\\D)(.+)");
/**
* public static Version check(String min, String last, String value) {
@ -76,6 +75,7 @@ public class Version {
public Version(String value) {
raw = value;
this.init();
}
@ -83,6 +83,20 @@ public class Version {
* HELPER
**/
/**
* init parse and store values for other functions of an Version instance
* it use the raw variable as base
*
* @return if parse was successfully
*/
private boolean init() {
this.raw = raw;
// ....
return true;
}
/**
* @param min
* @param last