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

io.kubernetes.client.fluent.Visitable Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.fluent;

import java.util.Map.Entry;
import java.lang.Class;
import java.lang.Object;
import java.util.List;
import java.lang.String;
import java.util.Collections;
public interface Visitable{
  default T accept(Class type,Visitor visitor) {
    return accept(new Visitor() {
      @Override
      public Class getType() {
        return type;
      }

      @Override
      public void visit(V element) {
        visitor.visit(element);
      }
    });
  }
  default T accept(io.kubernetes.client.fluent.Visitor... visitors) {
    for (Visitor visitor : visitors) {
      if (visitor.canVisit(Collections.emptyList(), this)) {
        visitor.visit(this);
      }
    }
    return getTarget(this);
  }
  default T accept(List> path,io.kubernetes.client.fluent.Visitor... visitors) {
    return accept(path, "", visitors);
  }
  default T accept(List> path,String currentKey,io.kubernetes.client.fluent.Visitor... visitors) {
    for (Visitor visitor : visitors) {
      if (visitor.canVisit(path, this)) {
        visitor.visit(path, this);
      }
    }
    return getTarget(this);
  }
  default T getTarget(Visitable visitable) {
    return (T) visitable;
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy