mercredi 8 février 2023

What pattern to use?

Hello For example I have a class

class Settings<T> {
 private int oneParam;
 private int twoParam;
 private int 3Param;
 private T clientSettings;}

T for examples are ftpSettings and sshSettings classess. How can I get this field T , invoke method like getClientSetting(ClientType.FTP), where clientTYPE is ENUM. How compose such structute? Or which pattern to use for that ?

;

Aucun commentaire:

Enregistrer un commentaire