io.dekorate.application.config.InfoBuilder Maven / Gradle / Ivy
package io.dekorate.application.config;
import io.dekorate.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class InfoBuilder extends InfoFluentImpl implements VisitableBuilder{
InfoFluent> fluent;
Boolean validationEnabled;
public InfoBuilder(){
this(true);
}
public InfoBuilder(Boolean validationEnabled){
this(new Info(), validationEnabled);
}
public InfoBuilder(InfoFluent> fluent){
this(fluent, true);
}
public InfoBuilder(InfoFluent> fluent,Boolean validationEnabled){
this(fluent, new Info(), validationEnabled);
}
public InfoBuilder(InfoFluent> fluent,io.dekorate.application.config.Info instance){
this(fluent, instance, true);
}
public InfoBuilder(InfoFluent> fluent,io.dekorate.application.config.Info instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withName(instance.getName());
fluent.withValue(instance.getValue());
fluent.withType(instance.getType());
fluent.withValueFrom(instance.getValueFrom());
this.validationEnabled = validationEnabled;
}
public InfoBuilder(io.dekorate.application.config.Info instance){
this(instance,true);
}
public InfoBuilder(io.dekorate.application.config.Info instance,Boolean validationEnabled){
this.fluent = this;
this.withName(instance.getName());
this.withValue(instance.getValue());
this.withType(instance.getType());
this.withValueFrom(instance.getValueFrom());
this.validationEnabled = validationEnabled;
}
public EditableInfo build(){
EditableInfo buildable = new EditableInfo(fluent.getName(),fluent.getValue(),fluent.getType(),fluent.getValueFrom());
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;
InfoBuilder that = (InfoBuilder) 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