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

io.dekorate.halkyon.config.ParameterBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.0.beta2
Show newest version
package io.dekorate.halkyon.config;

import io.dekorate.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class ParameterBuilder extends io.dekorate.halkyon.config.ParameterFluentImpl implements VisitableBuilder{

    io.dekorate.halkyon.config.ParameterFluent fluent;
    Boolean validationEnabled;

    public ParameterBuilder(){
            this(true);
    }
    public ParameterBuilder(Boolean validationEnabled){
            this(new Parameter(), validationEnabled);
    }
    public ParameterBuilder(io.dekorate.halkyon.config.ParameterFluent fluent){
            this(fluent, true);
    }
    public ParameterBuilder(io.dekorate.halkyon.config.ParameterFluent fluent,Boolean validationEnabled){
            this(fluent, new Parameter(), validationEnabled);
    }
    public ParameterBuilder(io.dekorate.halkyon.config.ParameterFluent fluent,io.dekorate.halkyon.config.Parameter instance){
            this(fluent, instance, true);
    }
    public ParameterBuilder(io.dekorate.halkyon.config.ParameterFluent fluent,io.dekorate.halkyon.config.Parameter instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withName(instance.getName()); 
            fluent.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }
    public ParameterBuilder(io.dekorate.halkyon.config.Parameter instance){
            this(instance,true);
    }
    public ParameterBuilder(io.dekorate.halkyon.config.Parameter instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withName(instance.getName()); 
            this.withValue(instance.getValue()); 
            this.validationEnabled = validationEnabled; 
    }

    public io.dekorate.halkyon.config.EditableParameter build(){
            EditableParameter buildable = new EditableParameter(fluent.getName(),fluent.getValue());
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            ParameterBuilder that = (ParameterBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy