framework.AbstractBuilder Maven / Gradle / Ivy
package framework;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import framework.Try.TriConsumer;
/**
* Value object builder base
*
* @param Value type
* @param Builder type
* @param Field names type
*/
public abstract class AbstractBuilder, NAMES extends Enum>> implements Supplier, TriConsumer, String, Object> {
/**
* Text in case of "Optional.empty" in "toString"
*/
public String empty = "(未設定)";
/**
* Key-value separator in "toString"
*/
public String pairSeparator = ": ";
/**
* Entry separator in "toString"
*/
public String entrySeparator = ", ";
/**
* Validator
*/
public Runnable validator = null;
/**
* Meta info
*/
final Meta meta;
/**
* Field values
*/
final Object[] values;
/**
* Converter
*/
final Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy