Skip to content

Commit 6bd7fe4

Browse files
committed
Javadoc
Close HTML tags
1 parent dc4af3f commit 6bd7fe4

6 files changed

Lines changed: 30 additions & 10 deletions

File tree

src/main/java/org/apache/commons/codec/digest/Blake3.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ private static void round(final int[] state, final int[] msg, final byte[] sched
307307
g(state, 3, 4, 9, 14, msg[schedule[14]], msg[schedule[15]]);
308308
}
309309

310-
// pre-permuted for all 7 rounds; the second row (2,6,3,...) indicates the base permutation
310+
/**
311+
* Pre-permuted for all 7 rounds; the second row (2,6,3,...) indicates the base permutation.
312+
*/
311313
private static final byte[][] MSG_SCHEDULE = {
312314
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
313315
{ 2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8 },

src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* {@link #setMaxCodeLen(int)} but is not volatile, and accesses are not synchronized. If an instance of the class is
3030
* shared between threads, the caller needs to ensure that suitable synchronization is used to ensure safe publication
3131
* of the value between threads, and must not invoke {@link #setMaxCodeLen(int)} after initial setup.
32+
* </p>
3233
*
3334
* @see <a href="http://drdobbs.com/184401251?pgno=2">Original Article</a>
3435
* @see <a href="http://en.wikipedia.org/wiki/Metaphone">http://en.wikipedia.org/wiki/Metaphone</a>

src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323

2424
/**
2525
* Match Rating Approach Phonetic Algorithm Developed by <CITE>Western Airlines</CITE> in 1977.
26-
*
26+
* <p>
2727
* This class is immutable and thread-safe.
28+
* </p>
2829
*
2930
* @see <a href="http://en.wikipedia.org/wiki/Match_rating_approach">Wikipedia - Match Rating Approach</a>
3031
* @since 1.8

src/main/java/org/apache/commons/codec/language/Metaphone.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
* <p>
2626
* Initial Java implementation by <CITE>William B. Brogden. December, 1997</CITE>.
2727
* Permission given by <CITE>wbrogden</CITE> for code to be used anywhere.
28+
* </p>
2829
* <p>
2930
* <CITE>Hanging on the Metaphone</CITE> by <CITE>Lawrence Philips</CITE> in <CITE>Computer Language of Dec. 1990,
3031
* p 39.</CITE>
32+
* </p>
3133
* <p>
3234
* Note, that this does not match the algorithm that ships with PHP, or the algorithm found in the Perl implementations:
3335
* </p>
@@ -40,13 +42,15 @@
4042
* <p>
4143
* They have had undocumented changes from the originally published algorithm.
4244
* For more information, see <a href="https://issues.apache.org/jira/browse/CODEC-57">CODEC-57</a>.
45+
* </p>
4346
* <p>
4447
* This class is conditionally thread-safe.
4548
* The instance field for maximum code length is mutable {@link #setMaxCodeLen(int)}
4649
* but is not volatile, and accesses are not synchronized.
4750
* If an instance of the class is shared between threads, the caller needs to ensure that suitable synchronization
4851
* is used to ensure safe publication of the value between threads, and must not invoke {@link #setMaxCodeLen(int)}
4952
* after initial setup.
53+
* </p>
5054
*/
5155
public class Metaphone implements StringEncoder {
5256

@@ -346,10 +350,9 @@ private boolean isNextChar(final StringBuilder string, final int index, final ch
346350

347351
private boolean regionMatch(final StringBuilder string, final int index, final String test) {
348352
boolean matches = false;
349-
if( index >= 0 &&
350-
index + test.length() - 1 < string.length() ) {
351-
final String substring = string.substring( index, index + test.length());
352-
matches = substring.equals( test );
353+
if (index >= 0 && index + test.length() - 1 < string.length()) {
354+
final String substring = string.substring(index, index + test.length());
355+
matches = substring.equals(test);
353356
}
354357
return matches;
355358
}
@@ -358,7 +361,6 @@ private boolean isLastChar(final int wdsz, final int n) {
358361
return n + 1 == wdsz;
359362
}
360363

361-
362364
/**
363365
* Encodes an Object using the metaphone algorithm. This method
364366
* is provided in order to satisfy the requirements of the

src/main/java/org/apache/commons/codec/language/Nysiis.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727
* general purpose scheme to find word with similar phonemes.
2828
* <p>
2929
* NYSIIS features an accuracy increase of 2.7% over the traditional Soundex algorithm.
30+
* </p>
3031
* <p>
3132
* Algorithm description:
33+
* </p>
3234
* <pre>
3335
* 1. Transcode first characters of name
3436
* 1a. MAC -&gt; MCC
@@ -60,6 +62,7 @@
6062
* </pre>
6163
* <p>
6264
* This class is immutable and thread-safe.
65+
* </p>
6366
*
6467
* @see <a href="http://en.wikipedia.org/wiki/NYSIIS">NYSIIS on Wikipedia</a>
6568
* @see <a href="http://www.dropby.com/NYSIIS.html">NYSIIS on dropby.com</a>

src/main/java/org/apache/commons/codec/language/Soundex.java

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ public class Soundex implements StringEncoder {
3636
* Note: the {@link #US_ENGLISH_MAPPING_STRING} does not use this mechanism
3737
* because changing it might break existing code. Mappings that don't contain
3838
* a silent marker code are treated as though H and W are silent.
39+
* </p>
3940
* <p>
4041
* To override this, use the {@link #Soundex(String, boolean)} constructor.
42+
* </p>
43+
*
4144
* @since 1.11
4245
*/
4346
public static final char SILENT_MARKER = '-';
@@ -48,12 +51,13 @@ public class Soundex implements StringEncoder {
4851
* <p>
4952
* (This constant is provided as both an implementation convenience and to allow Javadoc to pick
5053
* up the value for the constant values page.)
54+
* </p>
5155
* <p>
5256
* <b>Note that letters H and W are treated specially.</b>
5357
* They are ignored (after the first letter) and don't act as separators
5458
* between consonants with the same code.
59+
* </p>
5560
*/
56-
// ABCDEFGHIJKLMNOPQRSTUVWXYZ
5761
public static final String US_ENGLISH_MAPPING_STRING = "01230120022455012623010202";
5862

5963
/**
@@ -82,6 +86,7 @@ public class Soundex implements StringEncoder {
8286
* Such letters aren't encoded (after the first), but they do
8387
* act as separators when dropping duplicate codes.
8488
* The mapping is otherwise the same as for {@link #US_ENGLISH}
89+
* </p>
8590
*
8691
* @since 1.11
8792
*/
@@ -94,9 +99,11 @@ public class Soundex implements StringEncoder {
9499
* This treats vowels (AEIOUY), H and W as silent letters.
95100
* Such letters are ignored (after the first) and do not
96101
* act as separators when dropping duplicate codes.
102+
* </p>
97103
* <p>
98104
* The codes for consonants are otherwise the same as for
99105
* {@link #US_ENGLISH_MAPPING_STRING} and {@link #US_ENGLISH_SIMPLIFIED}
106+
* </p>
100107
*
101108
* @since 1.11
102109
*/
@@ -123,6 +130,7 @@ public class Soundex implements StringEncoder {
123130
* In versions of the code prior to 1.11,
124131
* the code always treated H and W as silent (ignored) letters.
125132
* If this field is false, H and W are no longer special-cased.
133+
* </p>
126134
*/
127135
private final boolean specialCaseHW;
128136

@@ -140,11 +148,13 @@ public Soundex() {
140148
/**
141149
* Creates a soundex instance using the given mapping. This constructor can be used to provide an internationalized
142150
* mapping for a non-Western character set.
143-
*
151+
* <p>
144152
* Every letter of the alphabet is "mapped" to a numerical value. This char array holds the values to which each
145153
* letter is mapped. This implementation contains a default map for US_ENGLISH
154+
* </p>
146155
* <p>
147156
* If the mapping contains an instance of {@link #SILENT_MARKER} then H and W are not given special treatment
157+
* </p>
148158
*
149159
* @param mapping
150160
* Mapping array to use when finding the corresponding code for a given character
@@ -168,6 +178,7 @@ private boolean hasMarker(final char[] mapping) {
168178
* and/or possibly provide an internationalized mapping for a non-Western character set.
169179
* <p>
170180
* If the mapping contains an instance of {@link #SILENT_MARKER} then H and W are not given special treatment
181+
* </p>
171182
*
172183
* @param mapping
173184
* Mapping string to use when finding the corresponding code for a given character
@@ -205,7 +216,7 @@ public Soundex(final String mapping, final boolean specialCaseHW) {
205216
*
206217
* @see SoundexUtils#difference(StringEncoder,String,String)
207218
* @see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp"> MS
208-
* T-SQL DIFFERENCE </a>
219+
* T-SQL DIFFERENCE</a>
209220
*
210221
* @throws EncoderException
211222
* if an error occurs encoding one of the strings

0 commit comments

Comments
 (0)