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

io.fabric8.kubernetes.api.model.RootPathsFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model;

import java.util.ArrayList;
import java.lang.String;
import java.util.LinkedHashMap;
import java.util.function.Predicate;
import java.lang.Integer;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class RootPathsFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.RootPathsFluent{
  public RootPathsFluentImpl() {
  }
  public RootPathsFluentImpl(io.fabric8.kubernetes.api.model.RootPaths instance) {
    this.withPaths(instance.getPaths()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.util.List paths = new java.util.ArrayList();
  private java.util.Map additionalProperties;
  public A addToPaths(java.lang.Integer index,java.lang.String item) {
    if (this.paths == null) {this.paths = new java.util.ArrayList();}
    this.paths.add(index, item);
    return (A)this;
  }
  public A setToPaths(java.lang.Integer index,java.lang.String item) {
    if (this.paths == null) {this.paths = new java.util.ArrayList();}
    this.paths.set(index, item); return (A)this;
  }
  public A addToPaths(java.lang.String... items) {
    if (this.paths == null) {this.paths = new java.util.ArrayList();}
    for (java.lang.String item : items) {this.paths.add(item);} return (A)this;
  }
  public A addAllToPaths(java.util.Collection items) {
    if (this.paths == null) {this.paths = new java.util.ArrayList();}
    for (java.lang.String item : items) {this.paths.add(item);} return (A)this;
  }
  public A removeFromPaths(java.lang.String... items) {
    for (java.lang.String item : items) {if (this.paths!= null){ this.paths.remove(item);}} return (A)this;
  }
  public A removeAllFromPaths(java.util.Collection items) {
    for (java.lang.String item : items) {if (this.paths!= null){ this.paths.remove(item);}} return (A)this;
  }
  public java.util.List getPaths() {
    return this.paths;
  }
  public java.lang.String getPath(java.lang.Integer index) {
    return this.paths.get(index);
  }
  public java.lang.String getFirstPath() {
    return this.paths.get(0);
  }
  public java.lang.String getLastPath() {
    return this.paths.get(paths.size() - 1);
  }
  public java.lang.String getMatchingPath(java.util.function.Predicate predicate) {
    for (java.lang.String item: paths) { if(predicate.test(item)){ return item;} } return null;
  }
  public java.lang.Boolean hasMatchingPath(java.util.function.Predicate predicate) {
    for (java.lang.String item: paths) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withPaths(java.util.List paths) {
    if (paths != null) {this.paths = new java.util.ArrayList(); for (java.lang.String item : paths){this.addToPaths(item);}} else { this.paths = null;} return (A) this;
  }
  public A withPaths(java.lang.String... paths) {
    if (this.paths != null) {this.paths.clear();}
    if (paths != null) {for (java.lang.String item :paths){ this.addToPaths(item);}} return (A) this;
  }
  public java.lang.Boolean hasPaths() {
    return paths != null && !paths.isEmpty();
  }
  public A addNewPath(java.lang.String arg0) {
    return (A)addToPaths(new String(arg0));
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    RootPathsFluentImpl that = (RootPathsFluentImpl) o;
    if (paths != null ? !paths.equals(that.paths) :that.paths != null) return false;
    if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(paths,  additionalProperties,  super.hashCode());
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy