I have a method in which I get patientid
and scriptInfo
in parameters. But if I get them as null, then null is stored in Map and since null is stored so the Map size increases.
I want that if I receive this parameter as null, then I don't want to store them at all since null is itself is no value which is stored in Map and is not of use to me.
private Map<String, List<String>> getValidatedPatientData(ITransaction transaction, String patientId, String scriptInfo)
{
ppvValidatedinfo = new HashMap<String, List<String>>(); //
List<String> scriptDetails = new ArrayList<String>();
scriptDetails.add(scriptInfo);
ppvValidatedinfo.put(patientId, scriptDetails);
transaction.setValue(ITransactionHashtableWag.VALIDATED_PPV_PH_NBR, ppvValidatedinfo);
return ppvValidatedinfo;
}