All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.edurt.datacap.core.ServerVersion Maven / Gradle / Ivy

There is a newer version: 2024.4.0
Show newest version
package io.edurt.datacap.core;

import lombok.Data;

@Data
public class ServerVersion
{
    private String origin;

    private Integer major;
    private Integer minor;
    private Integer patch;

    public ServerVersion(String origin)
    {
        this.origin = origin;

        String[] arr = origin.split("\\.");
        for (int i = 0; i < arr.length; i++) {
            String str = arr[i];
            int v = Utils.isNumber(str) ? Integer.parseInt(str) : 0;
            if (i == 0) {
                this.major = v;
            }
            else if (i == 1) {
                minor = v;
            }
            else if (i == 2) {
                patch = v;
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy