add comments ...
This commit is contained in:
parent
26546d03ef
commit
3254da1149
@ -61,6 +61,7 @@ public enum Version {
|
||||
//init
|
||||
int i_min = 0, i_last = 0, i_value = 0;
|
||||
|
||||
//go down each integer (separated by points) until it is the last one
|
||||
while (value.indexOf(".")>0) {
|
||||
|
||||
//prepare for checks
|
||||
@ -68,13 +69,13 @@ public enum Version {
|
||||
if (last.indexOf(".") >= 0) i_last = Integer.valueOf(last.substring(0,last.indexOf(".")));
|
||||
if (value.indexOf(".") >= 0) i_value = Integer.valueOf(value.substring(0,value.indexOf(".")));
|
||||
|
||||
|
||||
if ( i_min != i_last ) {
|
||||
//check
|
||||
if (i_value < i_min) return 0;
|
||||
if (i_value > i_last) return 3;
|
||||
}
|
||||
|
||||
//delete checked integer and move on to next one
|
||||
min = min.substring(min.indexOf(".")+1);
|
||||
last = last.substring(last.indexOf(".")+1);
|
||||
value = value.substring(value.indexOf(".")+1);
|
||||
@ -85,6 +86,7 @@ public enum Version {
|
||||
i_last = Integer.valueOf(last);
|
||||
i_value = Integer.valueOf(value);
|
||||
|
||||
//check last integer
|
||||
if (i_value < i_min) return 0;
|
||||
if (i_min < i_value && i_value < i_last) return 1;
|
||||
if (i_value == i_last) return 2;
|
||||
|
Loading…
Reference in New Issue
Block a user