org.crosswire.common.diff

## Class Distance

- java.lang.Object
- - org.crosswire.common.diff.Distance

-     public final class Distance
      extends Object

  Compute the distance between 2 strings. The larger the number the greater the distance.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `private` | `Distance()` Prevent instantiation.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `getLevenshteinDistance(String source, String target)` Compute the LevenshteinDistance between two strings.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Distance

          private Distance()

      Prevent instantiation.

  - ### Method Detail

    - #### getLevenshteinDistance

          public static int getLevenshteinDistance(String source,
                                   String target)

      Compute the LevenshteinDistance between two strings. See www.merriampark.com/ldjava.htm for original implementation.
      Parameters:
        `source` - the baseline text
        `target` - the changed text
      Returns:
        the distance