Package org.mockserver.matchers
Class StringSimilarity
java.lang.Object
org.mockserver.matchers.StringSimilarity
Deterministic string-similarity metrics used by
FuzzyMatcher.
Implements the Jaro and Jaro-Winkler similarity algorithms directly (no
external dependency) so the same pair of inputs always produces the same
ratio between 0.0 (completely different) and 1.0 (identical).
- Author:
- jamesdbloom
-
Method Summary
-
Method Details
-
jaroWinkler
Jaro-Winkler similarity between two strings, in the range[0.0, 1.0].Two
nullor two empty strings are considered identical (1.0); comparing an empty/nullstring with a non-empty string yields0.0. -
jaro
Jaro similarity between two strings, in the range[0.0, 1.0].
-