MatchingUtils

public class MatchingUtils(source)

Utility class for matching objects.

Constructors

Link copied to clipboard
public void MatchingUtils()

Functions

Link copied to clipboard
public static int editDistance(String s1, String s2)
Calculates the similarity (a number within 0 and 1) between two strings.
Link copied to clipboard
public static T firstMatch<T>(Collection<T> objects, Matcher<? super T> matcher)
Returns the object in the given collection matched by the given matcher with the highest match score.
Link copied to clipboard
public static List<T> matches<T>(Collection<T> objects, Matcher<? super T> matcher)
Returns a list of all objects in the given collection matched by the given matcher sorted by match scores in descending order.
Link copied to clipboard
public static double similarity(String s1, String s2)
Calculates the similarity (a number within 0 and 1) between two strings.