Class WordsMatcher

java.lang.Object
lv.id.jc.piglatin.core.WordsMatcher
All Implemented Interfaces:
Function<String,Matcher>

@Component public class WordsMatcher extends Object implements Function<String,Matcher>
This class is responsible for matching words in a given phrase.
  • Constructor Details

    • WordsMatcher

      public WordsMatcher()
  • Method Details

    • apply

      public Matcher apply(String phrase)
      This method applies the word-matching pattern to a given phrase. It returns a Matcher object that can be used to find words in the phrase.
      Specified by:
      apply in interface Function<String,Matcher>
      Parameters:
      phrase - the phrase to apply the word-matching pattern to
      Returns:
      a Matcher object for finding words in the phrase