Class AbstractSplittingParser

java.lang.Object
parser.logical.AbstractSplittingParser
Direct Known Subclasses:
ComparingExpressionParser, LogicalExpressionParser

public abstract class AbstractSplittingParser extends Object
  • Field Details

  • Constructor Details

    • AbstractSplittingParser

      public AbstractSplittingParser()
      Dummy constructor to make more easy overriding
    • AbstractSplittingParser

      public AbstractSplittingParser(String expression, ExpressionLogger log)
  • Method Details

    • toPattern

      protected Pattern toPattern(String[] chars1, String[] chars2)
    • split

      List<String> split(String expression)
    • joinAsOr1n

      private static String joinAsOr1n(String[] chars)
    • concatWithArrayCopy

      static String[] concatWithArrayCopy(String[] array1, String[] array2)
    • escape

      private static String[] escape(String[] chars)
    • escape

      private static String escape(String s)
    • getOriginal

      public String getOriginal()
    • evaluate

      public abstract boolean evaluate()
    • getPrimaryChars1

      public abstract String[] getPrimaryChars1()
      Primary characters are processed first. Seondary second. The reason is, if some char is substring of another. Then first msut go the longer ones (which may contain secondary as substring) the goes secondary. Yah. it can be done bette.. by sorting by lenght and so on... but maybe next tim PrimaryChars1 are allowed without spaces
      Returns:
      strings which are substituted first
    • getPrimaryChars2

      public abstract String[] getPrimaryChars2()
      Primary characters are processed first. Seondary second. The reason is, if some char is substring of another. Then first msut go the longer ones (which may contain secondary as substring) the goes secondary. Yah. it can be done bette.. by sorting by lenght and so on... but maybe next tim PrimaryChars2 are NOT allowed without spaces
      Returns:
      strings which are substituted first
    • getSecondaryChars1

      public abstract String[] getSecondaryChars1()
      Primary characters are processed first. Seondary second. The reason is, if some char is substring of another. Then first msut go the longer ones (which may contain secondary as substring) the goes secondary. Yah. it can be done bette.. by sorting by lenght and so on... but maybe next tim SecondaryChars1 are allowed without spaces
      Returns:
      characters which are subsituted second
    • getSecondaryChars2

      public abstract String[] getSecondaryChars2()
      Primary characters are processed first. Seondary second. The reason is, if some char is substring of another. Then first msut go the longer ones (which may contain secondary as substring) the goes secondary. Yah. it can be done bette.. by sorting by lenght and so on... but maybe next tim SecondaryChars2 are NOT allowed without spaces
      Returns:
      characters which are subsituted second
    • getHelp

      public String getHelp()
    • getName

      public abstract String getName()