I would like to ask how to handle with multiple constructors.
if(a != null && b != null)
return new QueryProducer(query, a, b);
else if(a != null)
return new QueryProducer(query, a);
else if(b != null)
return new QueryProducer(query, b);
else return new QueryProducer(query);
I would like to avoid complex if else blocks. Scalability is also not very good in this case.