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

annotations.me.snowdrop.istio.api.model.v1.mixer.StringMapFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.mixer;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
import javax.validation.Valid;
import me.snowdrop.istio.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class StringMapFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements StringMapFluent{

    private Map entries;

    public StringMapFluentImpl(){
    }
    public StringMapFluentImpl(StringMap instance){
            this.withEntries(instance.getEntries()); 
    }

    public A addToEntries(String key,Integer value){
            if(key != null && value != null) {this.entries.put(key, value);} return (A)this;
    }

    public A addToEntries(Map map){
            if(map != null) { this.entries.putAll(map);} return (A)this;
    }

    public A removeFromEntries(String key){
            if(key != null && this.entries != null) {this.entries.remove(key);} return (A)this;
    }

    public A removeFromEntries(Map map){
            if(map != null) { for(Object key : map.keySet()) {if (this.entries != null){this.entries.remove(key);}}} return (A)this;
    }

    public Map getEntries(){
            return this.entries;
    }

    public A withEntries(Map entries){
            if (this.entries == null) { this.entries = new LinkedHashMap();} else {this.entries.clear();}
            if (entries != null) {this.entries.putAll(entries);} return (A) this;
    }

    public Boolean hasEntries(){
            return this.entries != null;
    }

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




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy