I am making a file searching program. This is contained in a "ParallelSearch" class. The signature is:
class ParallelSearch(condition: (Path, Int, String) => Boolean)
This is great and works. The user supplies a condition, that goes from a file path, a line number, and a string containing line content, to a Boolean. However, I would like to overload the constructor to allow the user to not specify file path or line number, and just search based on line contents. Like so:
def this(condition: String => Boolean) =
{
this((???): (Path, Int, String) => Boolean)
}
What I'm not sure about is what to put where I have the ???
right now. I can answer any other questions that will make understanding easier. Any help is appreciated! Thanks!