All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.supwisdom.spreadsheet.mapper.o2w.converter.LambdaPropertyStringifier Maven / Gradle / Ivy

There is a newer version: 1.0.9
Show newest version
package com.supwisdom.spreadsheet.mapper.o2w.converter;

import com.supwisdom.spreadsheet.mapper.model.core.Row;

import java.util.function.Function;

/**
 * 利用java8 lambda表达式的{@link PropertyStringifier}
 *
 * @param 

要转换成{@link Row}的object的某个property的类型 */ public class LambdaPropertyStringifier

extends PropertyStringifierTemplate { private Function function; /** * lambda表达式 * property: 要导出为{@link Row}的object的某个property的值 * * @param function String function(T property) */ public LambdaPropertyStringifier(Function function) { this.function = function; } @Override protected String convertProperty(Object property) { return function.apply((P) property); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy