Package parser

Class CustomScanner


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

      Constructors 
      Constructor Description
      CustomScanner​(java.lang.String input, boolean includeTokensInOutput, java.lang.String... splitterTokens)  
      CustomScanner​(java.lang.String input, boolean includeTokensInOutput, java.lang.String[] moreTokens, java.lang.String... tokens)  
      CustomScanner​(java.lang.String input, boolean includeTokensInOutput, java.lang.String[] splitterTokens, java.lang.String[] splitterTokens1, java.lang.String... splitterTokens2)
      A convenience constructor used when there exists more than one array containing the tokenizer data.
    • Method Summary

      Modifier and Type Method Description
      static void main​(java.lang.String[] args)  
      static void main1​(java.lang.String[] args)  
      java.util.List<java.lang.String> scan()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomScanner

        public CustomScanner​(java.lang.String input,
                             boolean includeTokensInOutput,
                             java.lang.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​(java.lang.String input,
                             boolean includeTokensInOutput,
                             java.lang.String[] moreTokens,
                             java.lang.String... tokens)
      • CustomScanner

        public CustomScanner​(java.lang.String input,
                             boolean includeTokensInOutput,
                             java.lang.String[] splitterTokens,
                             java.lang.String[] splitterTokens1,
                             java.lang.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 Detail

      • scan

        public java.util.List<java.lang.String> scan()
      • main

        public static void main​(java.lang.String[] args)
      • main1

        public static void main1​(java.lang.String[] args)