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

com.github.raduciumag.shapeshift.service.TransformationGeneratorService Maven / Gradle / Ivy

There is a newer version: 0.5.2
Show newest version
package com.github.raduciumag.shapeshift.service;

import com.github.raduciumag.shapeshift.model.transformation.generator.TransformationGenerator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

@Service
public class TransformationGeneratorService {

    private final List transformationGenerators;

    @Autowired
    public TransformationGeneratorService(final List transformationGenerators) {
        this.transformationGenerators = transformationGenerators;
    }

    public Optional getGenerator(final String generatorName) {
        return transformationGenerators.stream()
                .filter(filter -> filter.getName().equals(generatorName))
                .findFirst();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy