This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-codec.git
The following commit(s) were added to refs/heads/master by this push:
new 6bd7fe48 Javadoc
6bd7fe48 is described below
commit 6bd7fe48950a11232a802265f6e9e6b82f5b1341
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jun 4 11:12:52 2023 -0400
Javadoc
Close HTML tags
---
.../java/org/apache/commons/codec/digest/Blake3.java | 4 +++-
.../apache/commons/codec/language/DoubleMetaphone.java | 1 +
.../codec/language/MatchRatingApproachEncoder.java | 3 ++-
.../org/apache/commons/codec/language/Metaphone.java | 12 +++++++-----
.../java/org/apache/commons/codec/language/Nysiis.java | 3 +++
.../java/org/apache/commons/codec/language/Soundex.java | 17 ++++++++++++++---
6 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/digest/Blake3.java
b/src/main/java/org/apache/commons/codec/digest/Blake3.java
index 0a4cc8bd..7ec5b5b7 100644
--- a/src/main/java/org/apache/commons/codec/digest/Blake3.java
+++ b/src/main/java/org/apache/commons/codec/digest/Blake3.java
@@ -307,7 +307,9 @@ public final class Blake3 {
g(state, 3, 4, 9, 14, msg[schedule[14]], msg[schedule[15]]);
}
- // pre-permuted for all 7 rounds; the second row (2,6,3,...) indicates the
base permutation
+ /**
+ * Pre-permuted for all 7 rounds; the second row (2,6,3,...) indicates the
base permutation.
+ */
private static final byte[][] MSG_SCHEDULE = {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
{ 2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8 },
diff --git
a/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
b/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
index 8b527a2a..a57907e2 100644
--- a/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
+++ b/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java
@@ -29,6 +29,7 @@ import org.apache.commons.codec.binary.StringUtils;
* {@link #setMaxCodeLen(int)} but is not volatile, and accesses are not
synchronized. If an instance of the class is
* shared between threads, the caller needs to ensure that suitable
synchronization is used to ensure safe publication
* of the value between threads, and must not invoke {@link
#setMaxCodeLen(int)} after initial setup.
+ * </p>
*
* @see <a href="http://drdobbs.com/184401251?pgno=2">Original Article</a>
* @see <a
href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a>
diff --git
a/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
b/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
index 4b637efe..86f08437 100644
---
a/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
+++
b/src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java
@@ -23,8 +23,9 @@ import org.apache.commons.codec.StringEncoder;
/**
* Match Rating Approach Phonetic Algorithm Developed by <CITE>Western
Airlines</CITE> in 1977.
- *
+ * <p>
* This class is immutable and thread-safe.
+ * </p>
*
* @see <a href="http://en.wikipedia.org/wiki/Match_rating_approach">Wikipedia
- Match Rating Approach</a>
* @since 1.8
diff --git a/src/main/java/org/apache/commons/codec/language/Metaphone.java
b/src/main/java/org/apache/commons/codec/language/Metaphone.java
index dee7cd9b..b3c6d5cc 100644
--- a/src/main/java/org/apache/commons/codec/language/Metaphone.java
+++ b/src/main/java/org/apache/commons/codec/language/Metaphone.java
@@ -25,9 +25,11 @@ import org.apache.commons.codec.StringEncoder;
* <p>
* Initial Java implementation by <CITE>William B. Brogden. December,
1997</CITE>.
* Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.
+ * </p>
* <p>
* <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in
<CITE>Computer Language of Dec. 1990,
* p 39.</CITE>
+ * </p>
* <p>
* Note, that this does not match the algorithm that ships with PHP, or the
algorithm found in the Perl implementations:
* </p>
@@ -40,6 +42,7 @@ import org.apache.commons.codec.StringEncoder;
* <p>
* They have had undocumented changes from the originally published algorithm.
* For more information, see <a
href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>.
+ * </p>
* <p>
* This class is conditionally thread-safe.
* The instance field for maximum code length is mutable {@link
#setMaxCodeLen(int)}
@@ -47,6 +50,7 @@ import org.apache.commons.codec.StringEncoder;
* If an instance of the class is shared between threads, the caller needs to
ensure that suitable synchronization
* is used to ensure safe publication of the value between threads, and must
not invoke {@link #setMaxCodeLen(int)}
* after initial setup.
+ * </p>
*/
public class Metaphone implements StringEncoder {
@@ -346,10 +350,9 @@ public class Metaphone implements StringEncoder {
private boolean regionMatch(final StringBuilder string, final int index,
final String test) {
boolean matches = false;
- if( index >= 0 &&
- index + test.length() - 1 < string.length() ) {
- final String substring = string.substring( index, index +
test.length());
- matches = substring.equals( test );
+ if (index >= 0 && index + test.length() - 1 < string.length()) {
+ final String substring = string.substring(index, index +
test.length());
+ matches = substring.equals(test);
}
return matches;
}
@@ -358,7 +361,6 @@ public class Metaphone implements StringEncoder {
return n + 1 == wdsz;
}
-
/**
* Encodes an Object using the metaphone algorithm. This method
* is provided in order to satisfy the requirements of the
diff --git a/src/main/java/org/apache/commons/codec/language/Nysiis.java
b/src/main/java/org/apache/commons/codec/language/Nysiis.java
index 28c3da4b..969c6a58 100644
--- a/src/main/java/org/apache/commons/codec/language/Nysiis.java
+++ b/src/main/java/org/apache/commons/codec/language/Nysiis.java
@@ -27,8 +27,10 @@ import org.apache.commons.codec.StringEncoder;
* general purpose scheme to find word with similar phonemes.
* <p>
* NYSIIS features an accuracy increase of 2.7% over the traditional Soundex
algorithm.
+ * </p>
* <p>
* Algorithm description:
+ * </p>
* <pre>
* 1. Transcode first characters of name
* 1a. MAC -> MCC
@@ -60,6 +62,7 @@ import org.apache.commons.codec.StringEncoder;
* </pre>
* <p>
* This class is immutable and thread-safe.
+ * </p>
*
* @see <a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a>
* @see <a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a>
diff --git a/src/main/java/org/apache/commons/codec/language/Soundex.java
b/src/main/java/org/apache/commons/codec/language/Soundex.java
index fa128917..b26831de 100644
--- a/src/main/java/org/apache/commons/codec/language/Soundex.java
+++ b/src/main/java/org/apache/commons/codec/language/Soundex.java
@@ -36,8 +36,11 @@ public class Soundex implements StringEncoder {
* Note: the {@link #US_ENGLISH_MAPPING_STRING} does not use this mechanism
* because changing it might break existing code. Mappings that don't
contain
* a silent marker code are treated as though H and W are silent.
+ * </p>
* <p>
* To override this, use the {@link #Soundex(String, boolean)} constructor.
+ * </p>
+ *
* @since 1.11
*/
public static final char SILENT_MARKER = '-';
@@ -48,12 +51,13 @@ public class Soundex implements StringEncoder {
* <p>
* (This constant is provided as both an implementation convenience and to
allow Javadoc to pick
* up the value for the constant values page.)
+ * </p>
* <p>
* <b>Note that letters H and W are treated specially.</b>
* They are ignored (after the first letter) and don't act as separators
* between consonants with the same code.
+ * </p>
*/
- //
ABCDEFGHIJKLMNOPQRSTUVWXYZ
public static final String US_ENGLISH_MAPPING_STRING =
"01230120022455012623010202";
/**
@@ -82,6 +86,7 @@ public class Soundex implements StringEncoder {
* Such letters aren't encoded (after the first), but they do
* act as separators when dropping duplicate codes.
* The mapping is otherwise the same as for {@link #US_ENGLISH}
+ * </p>
*
* @since 1.11
*/
@@ -94,9 +99,11 @@ public class Soundex implements StringEncoder {
* This treats vowels (AEIOUY), H and W as silent letters.
* Such letters are ignored (after the first) and do not
* act as separators when dropping duplicate codes.
+ * </p>
* <p>
* The codes for consonants are otherwise the same as for
* {@link #US_ENGLISH_MAPPING_STRING} and {@link #US_ENGLISH_SIMPLIFIED}
+ * </p>
*
* @since 1.11
*/
@@ -123,6 +130,7 @@ public class Soundex implements StringEncoder {
* In versions of the code prior to 1.11,
* the code always treated H and W as silent (ignored) letters.
* If this field is false, H and W are no longer special-cased.
+ * </p>
*/
private final boolean specialCaseHW;
@@ -140,11 +148,13 @@ public class Soundex implements StringEncoder {
/**
* Creates a soundex instance using the given mapping. This constructor
can be used to provide an internationalized
* mapping for a non-Western character set.
- *
+ * <p>
* Every letter of the alphabet is "mapped" to a numerical value. This
char array holds the values to which each
* letter is mapped. This implementation contains a default map for
US_ENGLISH
+ * </p>
* <p>
* If the mapping contains an instance of {@link #SILENT_MARKER} then H
and W are not given special treatment
+ * </p>
*
* @param mapping
* Mapping array to use when finding the corresponding
code for a given character
@@ -168,6 +178,7 @@ public class Soundex implements StringEncoder {
* and/or possibly provide an internationalized mapping for a non-Western
character set.
* <p>
* If the mapping contains an instance of {@link #SILENT_MARKER} then H
and W are not given special treatment
+ * </p>
*
* @param mapping
* Mapping string to use when finding the corresponding code
for a given character
@@ -205,7 +216,7 @@ public class Soundex implements StringEncoder {
*
* @see SoundexUtils#difference(StringEncoder,String,String)
* @see <a
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp">
MS
- * T-SQL DIFFERENCE </a>
+ * T-SQL DIFFERENCE</a>
*
* @throws EncoderException
* if an error occurs encoding one of the strings