Class ComparingExpressionParser
java.lang.Object
parser.logical.AbstractSplittingParser
parser.logical.ComparingExpressionParser
- All Implemented Interfaces:
LogicalExpressionMemberFactory.LogicalExpressionMember
public class ComparingExpressionParser
extends AbstractSplittingParser
implements LogicalExpressionMemberFactory.LogicalExpressionMember
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String[]
private static final String[]
private static final String[]
private static final String[]
Fields inherited from class AbstractSplittingParser
log, split
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
evaluate()
The method should understand true/false strings, if it is supposed to be used in more complicated expressions.getName()
String[]
Primary characters are processed first.String[]
Primary characters are processed first.String[]
Primary characters are processed first.String[]
Primary characters are processed first.boolean
isLogicalExpressionMember
(String originalExpression) ParserNG have a habit, that expression is parsed in constructor, and later evaluated in methood.static boolean
parseBooleanStrict
(String trim, ExpressionLogger log) Methods inherited from class AbstractSplittingParser
concatWithArrayCopy, getHelp, getOriginal, split, toPattern
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface LogicalExpressionMemberFactory.LogicalExpressionMember
getHelp
-
Field Details
-
-
primaryChars2
-
secondaryChars1
-
secondaryChars2
-
-
Constructor Details
-
ComparingExpressionParser
-
ComparingExpressionParser
public ComparingExpressionParser()
-
-
Method Details
-
isLogicalExpressionMember
Description copied from interface:LogicalExpressionMemberFactory.LogicalExpressionMember
ParserNG have a habit, that expression is parsed in constructor, and later evaluated in methood. So this methid is takin parameter, of future expression, created over dummy example, so we know, whether it will be viable for future constructor.- Specified by:
isLogicalExpressionMember
in interfaceLogicalExpressionMemberFactory.LogicalExpressionMember
- Parameters:
originalExpression
- future expression to be passed to constructor- Returns:
- whether the expression is most likely targeted for this parser
-
getPrimaryChars1
Description copied from class:AbstractSplittingParser
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- Specified by:
getPrimaryChars1
in classAbstractSplittingParser
- Returns:
- strings which are substituted first
-
getPrimaryChars2
Description copied from class:AbstractSplittingParser
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- Specified by:
getPrimaryChars2
in classAbstractSplittingParser
- Returns:
- strings which are substituted first
-
getSecondaryChars1
Description copied from class:AbstractSplittingParser
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- Specified by:
getSecondaryChars1
in classAbstractSplittingParser
- Returns:
- characters which are subsituted second
-
getSecondaryChars2
Description copied from class:AbstractSplittingParser
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- Specified by:
getSecondaryChars2
in classAbstractSplittingParser
- Returns:
- characters which are subsituted second
-
evaluate
public boolean evaluate()Description copied from interface:LogicalExpressionMemberFactory.LogicalExpressionMember
The method should understand true/false strings, if it is supposed to be used in more complicated expressions.- Specified by:
evaluate
in interfaceLogicalExpressionMemberFactory.LogicalExpressionMember
- Specified by:
evaluate
in classAbstractSplittingParser
- Returns:
- evaluated expression, usually parsed in constructor
-
parseBooleanStrict
-
getName
- Specified by:
getName
in classAbstractSplittingParser
-