Clarify wording in StringMetric interface
Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/49e60f05 Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/49e60f05 Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/49e60f05 Branch: refs/heads/master Commit: 49e60f05a899edd2f4efa766b65d480ee278f1e3 Parents: 7a81883 Author: Benedikt Ritter <brit...@apache.org> Authored: Sun Dec 14 21:13:36 2014 +0100 Committer: Benedikt Ritter <brit...@apache.org> Committed: Sun Dec 14 21:13:36 2014 +0100 ---------------------------------------------------------------------- .../commons/text/similarity/StringMetric.java | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-text/blob/49e60f05/src/main/java/org/apache/commons/text/similarity/StringMetric.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/text/similarity/StringMetric.java b/src/main/java/org/apache/commons/text/similarity/StringMetric.java index 4a94367..6c7b9ce 100644 --- a/src/main/java/org/apache/commons/text/similarity/StringMetric.java +++ b/src/main/java/org/apache/commons/text/similarity/StringMetric.java @@ -17,27 +17,24 @@ package org.apache.commons.text.similarity; /** - * <p> - * Marker interface for <a - * href='http://en.wikipedia.org/wiki/String_metric'>String Metrics</a> - * </p> + * Interface for <a + * href='http://en.wikipedia.org/wiki/String_metric'>String Metrics</a>. * * <p> - * A string metric measures the distance between two text strings. + * A string metric measures the distance between two character sequences. The higher the distance, the lesser the + * similarity between the two character sequences. * </p> * - * @param <R> return type of the edit distance + * @param <R> The type of score used by this StringMetric. */ public interface StringMetric<R> { /** - * <p> - * Compares two strings. - * </p> + * Compares two CharSequences. * - * @param left the first string - * @param right the second string - * @return result distance + * @param left the first CharSequence + * @param right the second CharSequence + * @return the distance between to two CharSequences */ R compare(CharSequence left, CharSequence right);