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

com.github.davidmoten.odata.client.generator.Options Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package com.github.davidmoten.odata.client.generator;

import java.util.List;

public final class Options {

    private final String outputDirectory;

    private final List schemaOptions;

    public Options(String outputDirectory, List schemaOptions) {
        this.outputDirectory = outputDirectory;
        this.schemaOptions = schemaOptions;
    }

    public String getOutputDirectory() {
        return outputDirectory;
    }

    public SchemaOptions getSchemaOptions(String namespace) {
        return schemaOptions //
                .stream() //
                .filter(x -> namespace.equals(x.namespace)) //
                .findFirst() //
                .orElseThrow(() -> {
                    throw new IllegalArgumentException(
                            "namespace not found in schemaOptions: " + namespace);
                });
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy