|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.byteslooser.filters.parser.generic.OperandFactory
public class OperandFactory
Default IRelationalOperandFactory implementation
List of supported operands:
| Nested Class Summary | |
|---|---|
class |
OperandFactory.ComparisonICaseOperand
Parent class to implement any comparison operand based on strings ignoring case |
class |
OperandFactory.ComparisonOperand
Parent class to implement any basic comparison operand. |
| Field Summary | |
|---|---|
protected Map<Class<?>,Comparator<?>> |
comparators
The provided comparators. |
IRelationalOperand |
distinctICaseOperand
Operator DIFFERENT THAN, applied to strings and ignoring case |
StringWildcardOperand |
distinctICaseREOperand
Operator DIFFERENT THAN, applied to strings, using limited (basic wildcards) regular expressions, and ignoring case |
IRelationalOperand |
distinctOperand
Operator DIFFERENT THAN |
StringWildcardOperand |
distinctREOperand
Operator DIFFERENT THAN, applied to strings, using limited (basic wildcards) regular expressions |
IRelationalOperand |
equalICaseOperand
Operator EQUAL THAN, applied to strings and ignoring case |
StringWildcardOperand |
equalICaseREOperand
Operator EQUAL THAN, applied to strings, using limited (basic wildcards) regular expressions, and ignoring case |
IRelationalOperand |
equalOperand
Operator EQUAL THAN |
StringWildcardOperand |
equalREOperand
Operator EQUAL THAN, applied to strings, using limited (basic wildcards) regular expressions |
IRelationalOperand |
greaterICaseOperand
Operator GREATER THAN, applied to strings and ignoring case |
IRelationalOperand |
greaterOperand
Operator GREATER THAN |
IRelationalOperand |
greaterOrEqualICaseOperand
Operator GREATER OR EQUAL THAN, applied to strings and ignoring case |
IRelationalOperand |
greaterOrEqualOperand
Operator GREATER OR EQUAL THAN |
protected boolean |
ignoreCase
Whether to ignore case or not |
IRelationalOperand |
lowerICaseOperand
Operator LOWER THAN, applied to strings and ignoring case |
IRelationalOperand |
lowerOperand
Operator LOWER THAN |
IRelationalOperand |
lowerOrEqualICaseOperand
Operator LOWER OR EQUAL THAN, applied to strings and ignoring case |
IRelationalOperand |
lowerOrEqualOperand
Operator LOWER OR EQUAL THAN |
| Constructor Summary | |
|---|---|
OperandFactory()
|
|
| Method Summary | |
|---|---|
IRelationalOperand |
getDefaultOperand(Class<?> c,
boolean nullOp,
boolean rightId)
The default implementation returns the EQUAL THAN operand for all types except String, and the regular expression based EQUAL THAN for strings. |
IRelationalOperand |
getOperand(char c,
String all,
int index)
Returns the operand that exists at the beginning of the substring all[index:] |
void |
setComparator(Class<?> c,
Comparator<?> cmp)
Defines a comparator for a given class. |
void |
setIgnoreCase(boolean ignore)
Defines whether the created operand should be case insensitive. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<Class<?>,Comparator<?>> comparators
protected boolean ignoreCase
public final IRelationalOperand greaterOperand
public final IRelationalOperand greaterOrEqualOperand
public final IRelationalOperand lowerOperand
public final IRelationalOperand lowerOrEqualOperand
public final IRelationalOperand equalOperand
public final IRelationalOperand distinctOperand
public final IRelationalOperand greaterICaseOperand
public final IRelationalOperand greaterOrEqualICaseOperand
public final IRelationalOperand lowerICaseOperand
public final IRelationalOperand lowerOrEqualICaseOperand
public final IRelationalOperand equalICaseOperand
public final IRelationalOperand distinctICaseOperand
public final StringWildcardOperand equalREOperand
public final StringWildcardOperand distinctREOperand
public final StringWildcardOperand equalICaseREOperand
public final StringWildcardOperand distinctICaseREOperand
| Constructor Detail |
|---|
public OperandFactory()
| Method Detail |
|---|
public IRelationalOperand getOperand(char c, String all, int index)
IRelationalOperandFactory
getOperand in interface IRelationalOperandFactoryc - the character at all[index]all - the whole stringindex - the position to start parsing
IRelationalOperandFactory.getOperand(char, String, int)public IRelationalOperand getDefaultOperand(Class<?> c, boolean nullOp, boolean rightId)
getDefaultOperand in interface IRelationalOperandFactoryc - the type's classnullOp - true if the value to be associated to the operand is the null instance.rightId - true if the comparison is against a second identifierIRelationalOperandFactory.getDefaultOperand(Class, boolean, boolean)public void setComparator(Class<?> c, Comparator<?> cmp)
IRelationalOperandFactory
setComparator in interface IRelationalOperandFactorypublic void setIgnoreCase(boolean ignore)
IRelationalOperandFactory
setIgnoreCase in interface IRelationalOperandFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||