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

io.deepsense.neptune.clientlibrary.models.impl.parameters.JobParametersFactory Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.models.impl.parameters;

import com.google.common.base.Preconditions;
import io.deepsense.neptune.clientlibrary.models.JobParameters;
import io.deepsense.neptune.clientlibrary.services.apimodelconverter.ApiModelConverter;

import java.util.List;

public class JobParametersFactory {

    private final ApiModelConverter apiModelConverter;

    private final List apiParameters;

    private final List apiParameterValues;

    public JobParametersFactory(
            ApiModelConverter apiModelConverter,
            io.deepsense.neptune.apiclient.model.Job apiJob) {
        this.apiModelConverter = Preconditions.checkNotNull(apiModelConverter);
        this.apiParameters = Preconditions.checkNotNull(apiJob).getParameters();
        this.apiParameterValues = apiJob.getParameterValues();
    }

    public JobParameters create() {
        return new JobParametersImpl(apiModelConverter, apiParameters, apiParameterValues);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy