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

io.fabric8.kubernetes.api.builder.BaseFluent Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.builder;

import java.util.List;
import java.util.List;
import java.util.Set;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.ArrayList;
import java.util.LinkedHashSet;

public class BaseFluent implements Fluent, Visitable{


    public final List _visitables = new ArrayList();

    public  ArrayList build( List> list){
    ArrayList r = new ArrayList<>();
for (Builder b : list) {
    r.add(b.build());
}
return r;

}
    public  LinkedHashSet build( LinkedHashSet> set){
    LinkedHashSet r = new LinkedHashSet<>();
for (Builder b : set) {
    r.add(b.build());
}
return r;

}
    public  ArrayList aggregate( List ...lists){
    ArrayList result = new ArrayList<>();

for (List list : lists) {
    result.addAll(list);
}
return result;

}
    public  LinkedHashSet aggregate( Set ...sets){
    LinkedHashSet result = new LinkedHashSet<>();

for (Set set : sets) {
    result.addAll(set);
}
return result;

}
    public T accept( Visitor visitor){
    for (Visitable v : _visitables) {
    v.accept(visitor);
}
try {
    visitor.visit(this);
} catch (ClassCastException e) {
    //ignore
}
return (T) this;

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy