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

com.neko233.toolchain.ripplex.strategy.merge.CountMergeStrategy Maven / Gradle / Ivy

package com.neko233.toolchain.ripplex.strategy.merge;

import java.util.function.BiFunction;

/**
 * @author SolarisNeko
 * Date on 2022-04-30
 */
public class CountMergeStrategy implements MergeStrategy {

    private static final MergeStrategy INSTANCE = new CountMergeStrategy();

    public static MergeStrategy getInstance() {
        return INSTANCE;
    }

    @Override
    public BiFunction getMergeBiFunction(Class sumType) {
        return (t1, t2) -> Integer.parseInt(String.valueOf(t1)) + 1;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy