Arrays.asList( allValueList ),
realCellValue.getStringValue(),
operator );
} else if ( type == null ) {
// type null means the field is free-format
newDetector = new UnrecognizedConditionDetector( pattern,
factField,
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_STRING ) ) {
newDetector = new StringConditionDetector( pattern,
factField,
realCellValue.getStringValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC ) ) {
newDetector = new NumericConditionDetector( pattern,
factField,
(BigDecimal) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_BIGDECIMAL ) ) {
newDetector = new NumericBigDecimalConditionDetector( pattern,
factField,
(BigDecimal) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_BIGINTEGER ) ) {
newDetector = new NumericBigIntegerConditionDetector( pattern,
factField,
(BigInteger) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_BYTE ) ) {
newDetector = new NumericByteConditionDetector( pattern,
factField,
(Byte) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_DOUBLE ) ) {
newDetector = new NumericDoubleConditionDetector( pattern,
factField,
(Double) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_FLOAT ) ) {
newDetector = new NumericFloatConditionDetector( pattern,
factField,
(Float) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_INTEGER ) ) {
newDetector = new NumericIntegerConditionDetector( pattern,
factField,
(Integer) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_LONG ) ) {
newDetector = new NumericLongConditionDetector( pattern,
factField,
(Long) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_NUMERIC_SHORT ) ) {
newDetector = new NumericShortConditionDetector( pattern,
factField,
(Short) realCellValue.getNumericValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_BOOLEAN ) ) {
newDetector = new BooleanConditionDetector( pattern,
factField,
realCellValue.getBooleanValue(),
operator );
} else if ( type.equals( SuggestionCompletionEngine.TYPE_DATE ) ) {
newDetector = new DateConditionDetector( pattern,
factField,
realCellValue.getDateValue(),
operator );
} else {
newDetector = new UnrecognizedConditionDetector( pattern,
factField,
operator );
}
return newDetector;
}