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

com.capitalone.dashboard.jenkins.JobContainer Maven / Gradle / Ivy

The newest version!
package com.capitalone.dashboard.jenkins;

import java.util.ArrayList;
import java.util.List;

public class JobContainer {

    private List jobs;

    private JobContainer(Builder builder) {
        jobs = builder.jobs;
    }

    public List getJobs() {
        return jobs;
    }

    public JobContainer() {
        // required for converter
    }

    @SuppressWarnings("PMD.AccessorClassGeneration")
    public static Builder newBuilder() {
        return new Builder();
    }


    public static final class Builder {
        private List jobs = new ArrayList<>();

        private Builder() {
        }

        public Builder job(JenkinsJob job) {
            this.jobs.add(job);
            return this;
        }

        @SuppressWarnings("PMD.AccessorClassGeneration")
        public JobContainer build() {
            return new JobContainer(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy