I have a text input file in this format:
<target1> : <dep1> <dep2> ... <target2> : <dep1> <dep2> ... ...
And a method that takes two parameters
function(target, dep);
I need this parsing to call my method with every goal, and for example:
function(target1, dep1); function(target1, dep2); function(target1, ...); function(target2, dep1); function(target2, dep2); function(target2, ...);
What would be the most efficient way to call function(target,dep) on each line of a text file? I tried to spoof the scanner and string.split, but was unsuccessful. I'm at a dead end.
Thanks.
source share