package tag;

import tag.matcherImplementations.CustomTagMatcher;

import java.util.Set;
import java.util.stream.Collectors;

public class CustomTagsUseCase {

    private final TagMatcherRepository tagMatcherRepository;

    public CustomTagsUseCase(TagMatcherRepository tagMatcherRepository) {
        this.tagMatcherRepository = tagMatcherRepository;
    }

    public void addCustomTagMatcher(CustomTagMatcher customTagMatcher) {
        tagMatcherRepository.addCustomTagMatcher(customTagMatcher);
    }

    public Set<TagName> getAllTagNames() {
        return this.tagMatcherRepository.getTagMatchers().stream().map(TagMatcher::getTagName).collect(Collectors.toSet());
    }
}
