Java代码优化:使用Lambda表达式简化代码逻辑
protected Function<ExamineEvaluationEntity, String> getMapperFunction(final boolean enablePriority) { \n if (enablePriority) { \n return item -> { \n item.setScoreStatus(CommonEnum.NO.getValue()); \n return item.getId(); \n }; \n } else { \n return ExamineEvaluationEntity::getId; \n } \n}
原文地址: https://www.cveoy.top/t/topic/pZmK 著作权归作者所有。请勿转载和采集!