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

com.vladsch.flexmark.util.collection.MinAggregator Maven / Gradle / Ivy

package com.vladsch.flexmark.util.collection;

import org.jetbrains.annotations.Nullable;

import java.util.function.BiFunction;

public class MinAggregator implements BiFunction {
    final public static MinAggregator INSTANCE = new MinAggregator();

    private MinAggregator() {
    }

    @Override
    public @Nullable Integer apply(@Nullable Integer aggregate, @Nullable Integer next) {
        return next == null || aggregate != null && aggregate <= next ? aggregate : next;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy