
convex.core.util.MergeFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of convex-core Show documentation
Show all versions of convex-core Show documentation
Convex core libraries and common utilities
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