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

io.dekorate.application.config.ContactBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.0.beta8
Show newest version
package io.dekorate.application.config;

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

public class ContactBuilder extends ContactFluentImpl implements VisitableBuilder{

    ContactFluent fluent;
    Boolean validationEnabled;

    public ContactBuilder(){
            this(true);
    }
    public ContactBuilder(Boolean validationEnabled){
            this(new Contact(), validationEnabled);
    }
    public ContactBuilder(ContactFluent fluent){
            this(fluent, true);
    }
    public ContactBuilder(ContactFluent fluent,Boolean validationEnabled){
            this(fluent, new Contact(), validationEnabled);
    }
    public ContactBuilder(ContactFluent fluent,io.dekorate.application.config.Contact instance){
            this(fluent, instance, true);
    }
    public ContactBuilder(ContactFluent fluent,io.dekorate.application.config.Contact instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withName(instance.getName()); 
            fluent.withEmail(instance.getEmail()); 
            fluent.withUrl(instance.getUrl()); 
            this.validationEnabled = validationEnabled; 
    }
    public ContactBuilder(io.dekorate.application.config.Contact instance){
            this(instance,true);
    }
    public ContactBuilder(io.dekorate.application.config.Contact instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withName(instance.getName()); 
            this.withEmail(instance.getEmail()); 
            this.withUrl(instance.getUrl()); 
            this.validationEnabled = validationEnabled; 
    }

    public EditableContact build(){
            EditableContact buildable = new EditableContact(fluent.getName(),fluent.getEmail(),fluent.getUrl());
            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;
            ContactBuilder that = (ContactBuilder) 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