com.moengage.operator.StringOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of condition-evaluator Show documentation
Show all versions of condition-evaluator Show documentation
Condition Evaluator for MoEngage Platform
The newest version!
package com.moengage.operator;
import com.moengage.datatype.MOEDataType;
public class StringOperation & MOEDataType> extends BaseOperation {
public StringOperation() {
super();
}
public boolean contains(T filterObject, T conditionObject){
String filterValue = filterObject.cast();
String attributeValue = conditionObject.getValue();
return filterValue.contains(attributeValue);
}
public boolean startsWith(T filterObject, T conditionObject){
String filterValue = filterObject.cast();
String attributeValue = conditionObject.getValue();
return filterValue.startsWith(attributeValue);
}
public boolean endsWith(T filterObject, T conditionObject){
String filterValue = filterObject.cast();
String attributeValue = conditionObject.getValue();
return filterValue.endsWith(attributeValue);
}
public boolean empty(T filterObject){
String filterValue = filterObject.cast();
return filterValue == null || filterValue.trim().isEmpty();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy