src/main/java/de/unixwork/uwproj/Define.java

Sun, 15 Oct 2023 19:20:41 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 15 Oct 2023 19:20:41 +0200
changeset 90
a13789dd1cfb
parent 41
75ee588d5d9e
child 113
24f32dbd88cd
permissions
-rw-r--r--

add --init and --update options

fixes #308
fixes #307

package de.unixwork.uwproj;

public class Define {
    private final String name;
    private final String value;

    public Define(String name, String value) {
        this.name = name;
        this.value = value;
    }
    
    public String getName() {
        return name;
    }

    public String getValue() {
        return value;
    }
    
    public String toFlags() {
        if(name == null) {
            return "";
        } else if(value == null) {
            return "-D"+name;
        } else {
            return "-D"+name + "=" + value;
        }
    }
}

mercurial