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

me.snowdrop.istio.mixer.adapter.prometheus.ExplicitFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.mixer.adapter.prometheus;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.lang.String;
import java.lang.Double;
import io.fabric8.kubernetes.api.builder.Predicate;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;

public class ExplicitFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ExplicitFluent{

    private List bounds;

    public ExplicitFluentImpl(){
    }
    public ExplicitFluentImpl(Explicit instance){
            this.withBounds(instance.getBounds()); 
    }

    public A addToBounds(int index,Double item){
            if (this.bounds == null) {this.bounds = new ArrayList();}
            this.bounds.add(index, item);
            return (A)this;
    }

    public A setToBounds(int index,Double item){
            if (this.bounds == null) {this.bounds = new ArrayList();}
            this.bounds.set(index, item); return (A)this;
    }

    public A addToBounds(Double... items){
            if (this.bounds == null) {this.bounds = new ArrayList();}
            for (Double item : items) {this.bounds.add(item);} return (A)this;
    }

    public A addAllToBounds(Collection items){
            if (this.bounds == null) {this.bounds = new ArrayList();}
            for (Double item : items) {this.bounds.add(item);} return (A)this;
    }

    public A removeFromBounds(Double... items){
            for (Double item : items) {if (this.bounds!= null){ this.bounds.remove(item);}} return (A)this;
    }

    public A removeAllFromBounds(Collection items){
            for (Double item : items) {if (this.bounds!= null){ this.bounds.remove(item);}} return (A)this;
    }

    public List getBounds(){
            return this.bounds;
    }

    public Double getBound(int index){
            return this.bounds.get(index);
    }

    public Double getFirstBound(){
            return this.bounds.get(0);
    }

    public Double getLastBound(){
            return this.bounds.get(bounds.size() - 1);
    }

    public Double getMatchingBound(io.fabric8.kubernetes.api.builder.Predicate predicate){
            for (Double item: bounds) { if(predicate.apply(item)){return item;} } return null;
    }

    public A withBounds(List bounds){
            if (this.bounds != null) { _visitables.removeAll(this.bounds);}
            if (bounds != null) {this.bounds = new ArrayList(); for (Double item : bounds){this.addToBounds(item);}} else { this.bounds = null;} return (A) this;
    }

    public A withBounds(Double... bounds){
            if (this.bounds != null) {this.bounds.clear();}
            if (bounds != null) {for (Double item :bounds){ this.addToBounds(item);}} return (A) this;
    }

    public Boolean hasBounds(){
            return bounds != null && !bounds.isEmpty();
    }

    public A addNewBound(String arg1){
            return (A)addToBounds(new Double(arg1));
    }

    public A addNewBound(double arg1){
            return (A)addToBounds(new Double(arg1));
    }

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




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy