public Builder setCacheService(CacheService cacheService){ this.cacheService = cacheService; returnthis; }
public Builder setStrategyService(StrategyService strategyService){ this.strategyService = strategyService; returnthis; }
public Builder setRepositoryService(RepositoryService repositoryService){ this.repositoryService = repositoryService; returnthis; }
public Task build(){ returnnew Task(cacheService, strategyService, repositoryService); } }
publicstaticvoidmain(String[] args){
CacheService cacheService = new CacheService(); StrategyService strategyService = new StrategyService(); RepositoryService repositoryService = new RepositoryService();