checkCondition method
bool
checkCondition(
- dynamic cuurentValue,
- FSOperator operation,
- dynamic audienceValue
)
Implementation
bool checkCondition(
dynamic cuurentValue, FSOperator operation, dynamic audienceValue) {
switch (operation) {
case FSOperator.EQUALS:
return isCurrentValueEqualToAudienceValue(cuurentValue, audienceValue);
case FSOperator.NOT_EQUALS:
return !isCurrentValueEqualToAudienceValue(cuurentValue, audienceValue);
case FSOperator.GREATER_THAN:
return isCurrentValueIsGreaterThanAudience(cuurentValue, audienceValue);
case FSOperator.GREATER_THAN_OR_EQUALS:
return isCurrentValueIsGreaterThanOrEqualAudience(
cuurentValue, audienceValue);
case FSOperator.LOWER_THAN:
return isCurrentValueIsLowerThanAudience(cuurentValue, audienceValue);
case FSOperator.LOWER_THAN_OR_EQUALS:
return isCurrentValueIsLowerThanOrEqualAudience(
cuurentValue, audienceValue);
case FSOperator.CONTAINS:
return isCurrentValueContainAudience(cuurentValue, audienceValue);
case FSOperator.NOT_CONTAINS:
return !isCurrentValueContainAudience(cuurentValue, audienceValue);
default:
return false;
}
}