Class JBBPTokenizer

java.lang.Object
com.igormaznitsa.jbbp.compiler.tokenizer.JBBPTokenizer
All Implemented Interfaces:
Iterable<JBBPToken>, Iterator<JBBPToken>

public final class JBBPTokenizer extends Object implements Iterable<JBBPToken>, Iterator<JBBPToken>
The Class implements a token parser which parses a String to binary block parser tokens and check their format.
Since:
1.0
  • Constructor Details

    • JBBPTokenizer

      public JBBPTokenizer(String str)
      Constructor.
      Parameters:
      str - a string to be parsed, must not be null.
    • JBBPTokenizer

      public JBBPTokenizer(String str, JBBPCustomFieldTypeProcessor customFieldTypeProcessor)
      Constructor.
      Parameters:
      str - a string to be parsed, must not be null.
      customFieldTypeProcessor - custom field type processor, it can be null
  • Method Details

    • isGlobalReservedName

      public static boolean isGlobalReservedName(String name)
      Case-sensitive check that the name is among global reserved ones.
      Parameters:
      name - the name to check, must not be null
      Returns:
      true if the name is globally reserved one, false otherwise.
    • iterator

      public Iterator<JBBPToken> iterator()
      Specified by:
      iterator in interface Iterable<JBBPToken>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<JBBPToken>
    • next

      public JBBPToken next()
      Specified by:
      next in interface Iterator<JBBPToken>
    • remove

      public void remove()
      The Operation is unsupported one.
      Specified by:
      remove in interface Iterator<JBBPToken>