Intro
Hi, I'm currently working on an import framework. The user will be using the framework to map data from a bulk of excel sheets to entities in the system. Whether some values need to be mapped to entities is dependent upon the condition of certain values in the files. It is a web application which is build in Java (Java servlets).
To the point
The user of the system needs to supply the system with a custom condition like:
CELLD4 == "Hello world"
My question is: How can I give the CELLD4 == "Hello world"
condition as a String to the system and let the system interpret it as an if
statement, like:
if (CELLD4 == "Hello world") {execute something}
What someone else has done is extract the two values from before the double equals sign (==
) and after the double equals sign and then execute an equals check to check whether the values are identical. But there seems to be a better and simpler way to go about this. Who has suggestions for me on how to best have the system interpret the custom condition input from the user of the system?