 |
|
Nickwongfree
V2EX member #162133, joined on 2016-03-06 18:08:31 +08:00
|
 |
Per Nickwongfree's settings, the topics list is hidden |
Deals info, including closed deals, is not hidden
Nickwongfree's recent replies
可以简洁一点,分支太多,4 条基本可以抽象出来新函数
void setLocation(String locationId, Function<String, Boolean> setFunction) {
if (locationId!=null) {
Region region = regionService.getById(locationId);
setFunction(region.getRegionName());
}
}
4 条调用如下
setLocation(shopView.getProvinceId(), showView::setProvinceDisp)
setLocation(shopView. getCityId(), showView:: setCityDisp)
....