Package lv.id.jc.piglatin.service
Class TranslationService
java.lang.Object
lv.id.jc.piglatin.service.TranslationService
The TranslationService class provides a service for translating English sentences to Pig Latin.
-
Constructor Summary
ConstructorDescriptionTranslationService
(UnaryOperator<String> translator, AtomicInteger translationCounter) -
Method Summary
-
Constructor Details
-
TranslationService
public TranslationService(@Qualifier("phraseTranslator") UnaryOperator<String> translator, @Qualifier("translationCounter") AtomicInteger translationCounter)
-
-
Method Details
-
translate
Translates a given text into Pig Latin.- Parameters:
text
- The text to be translated.- Returns:
- The translated text in Pig Latin.
-