private void checkProtocolAlreadyExists(Set<String> protocols,String protocolType){
  if (!protocols.contains(protocolType)) {
    protocols.add(protocolType);
  }
}

private void checkProtocolAlreadyExists ( Set < String > protocols , String protocolType ) { if ( ! protocols . contains ( protocolType ) ) { protocols . add ( protocolType ) ; } }
verify whether protocoltype already exists or not . if it doesn ' t exist then add .
