I need to turn a string such as
class freud IF : 0.010<=cst0.1<=0.02 ^ 0.012<=cst0.2<=0.014 ^ 0.01<=cst0.3<=0.011 ^ 0.009<=cst0.4<=0.01 ^ cst0.5=0.009 ^ 0.008<=cst0.6<=0.009 ^ 0.008<=cst0.7<=0.009 ^ 0.007<=cst0.8<=0.009 ^ 0.007<=cst0.9<=0.009 ^ 0.008<=cst1.0<=0.012
into an actual Java if statement: i.e.
if(0.010 <= cst0.1 && cst0.1 <= 0.02 .....)
where cst0.1 becomes the name of a float etc.
Any ideas? I have tried splitting the string into its components, but all the strings I need vary!
Thanks
you can try create evaluate method
boolean evaluate(String stringToEvaluate)wich will split your string on segments and evaluate each bit