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

graphql.schema.idl.MapEnumValuesProvider Maven / Gradle / Ivy

There is a newer version: 230521-nf-execution
Show newest version
package graphql.schema.idl;

import graphql.Assert;
import graphql.PublicApi;

import java.util.Map;

@PublicApi
public class MapEnumValuesProvider implements EnumValuesProvider {


    private final Map values;

    public MapEnumValuesProvider(Map values) {
        Assert.assertNotNull(values, () -> "values can't be null");
        this.values = values;
    }

    @Override
    public Object getValue(String name) {
        return values.get(name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy