Class CustomScanner

java.lang.Object
com.github.gbenroscience.parser.CustomScanner

public class CustomScanner extends Object
Since:
2011 Objects of this class scans a string into tokens based on a list of tokenizer values.
Author:
JIBOYE Oluwagbemiro Olaoluwa
  • Constructor Details

    • CustomScanner

      public CustomScanner(String input, boolean includeTokensInOutput, String... splitterTokens)
      Parameters:
      input - The input to scan.
      includeTokensInOutput - Will allow the splitting tokens to be added to the final scan if this attribute is set to true.
      splitterTokens - An array of tokens..input as a variable argument list... on which the input is to be split.
    • CustomScanner

      public CustomScanner(String input, boolean includeTokensInOutput, String[] moreTokens, String... tokens)
    • CustomScanner

      public CustomScanner(String input, boolean includeTokensInOutput, String[] splitterTokens, String[] splitterTokens1, String... splitterTokens2)
      A convenience constructor used when there exists more than one array containing the tokenizer data.
      Parameters:
      input - The input to scan.
      includeTokensInOutput - Will allow the splitting tokens to be added to the final scan if this attribute is set to true.
      splitterTokens - An array of tokens on which the input is to be split.
      splitterTokens1 - A second array of tokens on which the input is to be split.
      splitterTokens2 - A second array of tokens..input as a variable argument list... on which the input is to be split.
  • Method Details

    • scan

      public List<String> scan()
    • main

      public static void main(String[] args)