Class TranslationService

java.lang.Object
lv.id.jc.piglatin.service.TranslationService

@Service public class TranslationService extends Object
The TranslationService class provides a service for translating English sentences to Pig Latin.
  • Constructor Details

    • TranslationService

      public TranslationService(@Qualifier("phraseTranslator") UnaryOperator<String> translator, @Qualifier("translationCounter") AtomicInteger translationCounter)
  • Method Details

    • translate

      public String translate(String text)
      Translates a given text into Pig Latin.
      Parameters:
      text - The text to be translated.
      Returns:
      The translated text in Pig Latin.