I have a table of this kind:
And (following the project specifics) I have to define a method check(Row row) which take a Row of the table and then it will call a function result() defined by the framework user and will compare the returned value with the value in the column result() of the table above. I think that the code for check(Row row) (which body is not specified in the project specifics) should be something like this:
public boolean check(Row row)
{
x = row.column[0];
y = row.column[1];
if(result() == row.column[2])
return true;
else
return false;
}
The only thing that I don't know how to implment column since it should be a List (and not a simple array since the number of variable is dynamic depending on the number of the columns) which can contain any kind of different types or objects!
Don't worry about parser or code generator, I already handle them.
One specifics of the project is that I cannot use reflection since it decreases the performance
Aucun commentaire:
Enregistrer un commentaire