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

sh.ivan.zod.schema.attribute.NegativeAttribute Maven / Gradle / Ivy

package sh.ivan.zod.schema.attribute;

import lombok.Data;

@Data
public class NegativeAttribute implements Attribute {
    private final boolean includeZero;

    public NegativeAttribute() {
        this(false);
    }

    public NegativeAttribute(boolean includeZero) {
        this.includeZero = includeZero;
    }

    @Override
    public String zodMethod() {
        return includeZero ? "max(0)" : "negative()";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy