- public boolean is_version_great_than(String version) {
- boolean result = false;
- if (!StringUtil.isNullorEmpty(version)
- && version.indexOf(".")>= 0) {
- String[] version_num = version.split(".");
- String[] cur_num = clientVersion.split(".");
- int loop_count = version_num.length;
- if (cur_num.length <version_num.length) {
- loop_count = cur_num.length;
- }
- for (int i = 0; i < loop_count; i++) {
- if (Integer.valueOf(version_num[i])> Integer.valueOf(cur_num[i])) {
- result = true;
- break;
- }
- }
- }
- return result;
- }
来源: http://www.bubuko.com/infodetail-2801975.html