Package hudson.util
Class EditDistance
java.lang.Object
hudson.util.EditDistance
Computes the string edit distance.
 
Refer to a computer science text book for the definition of the "string edit distance".
- Author:
 - Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
 
- 
Method Summary
Modifier and TypeMethodDescriptionstatic inteditDistance(String a, String b) Computes the edit distance between two strings.static StringfindNearest(String key, String[] group) Finds the string in thegroupclosest tokeyand returns it.static StringfindNearest(String key, Collection<String> group)  
- 
Method Details
- 
editDistance
Computes the edit distance between two strings.The complexity is O(nm) where n=a.length() and m=b.length().
 - 
findNearest
Finds the string in thegroupclosest tokeyand returns it.- Returns:
 - null if group.length==0.
 
 - 
findNearest
 
 -