public class LevenshteinDistance extends java.lang.Object implements StringDistance
Constructor and Description |
---|
LevenshteinDistance()
Optimized to run a bit faster than the static getDistance().
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
float |
getDistance(java.lang.String target,
java.lang.String other)
Returns a float between 0 and 1 based on how similar the specified strings are to one another.
|
int |
hashCode() |
java.lang.String |
toString() |
public LevenshteinDistance()
public final float getDistance(java.lang.String target, java.lang.String other)
StringDistance
getDistance
in interface StringDistance
target
- The first string.other
- The second string.public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public final java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.