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

convex.core.util.MergeFunction Maven / Gradle / Ivy

There is a newer version: 0.7.15
Show newest version
package convex.core.util;

public abstract interface MergeFunction {

	public abstract V merge(V a, V b);

	/**
	 * Reverse a MergeFunction so that it can be applied with opposite ordering.
	 * This is useful for handling merge functions that are not commutative.
	 * 
	 * @return A MergeFunction that merges the arguments in the reverse order.
	 */
	public default MergeFunction reverse() {
		return (a, b) -> merge(b, a);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy