Skip to content

Commit 10fd9a4

Browse files
committed
Add missing Javadoc
1 parent 4d917fa commit 10fd9a4

13 files changed

+201
-44
lines changed

src/main/java/org/apache/commons/codec/binary/BinaryCodec.java

+7
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,13 @@ public static String toAsciiString(final byte[] raw) {
211211
return new String(toAsciiChars(raw));
212212
}
213213

214+
/**
215+
* Constructs a new instance.
216+
*/
217+
public BinaryCodec() {
218+
// empty
219+
}
220+
214221
/**
215222
* Decodes a byte array where each byte represents an ASCII '0' or '1'.
216223
*

src/main/java/org/apache/commons/codec/binary/CharSequenceUtils.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,6 @@
2929
*/
3030
public class CharSequenceUtils {
3131

32-
/**
33-
* Consider package-private.
34-
*
35-
* @deprecated Will be package-private in the next major version.
36-
*/
37-
@Deprecated
38-
public CharSequenceUtils() {
39-
// empty
40-
}
41-
4232
/**
4333
* Green implementation of regionMatches.
4434
*
@@ -86,4 +76,14 @@ static boolean regionMatches(final CharSequence cs, final boolean ignoreCase, fi
8676
}
8777
return true;
8878
}
79+
80+
/**
81+
* Consider private.
82+
*
83+
* @deprecated Will be private in the next major version.
84+
*/
85+
@Deprecated
86+
public CharSequenceUtils() {
87+
// empty
88+
}
8989
}

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

+14
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ public final class MurmurHash3 {
7373
@Deprecated
7474
public static class IncrementalHash32 extends IncrementalHash32x86 {
7575

76+
/**
77+
* Constructs a new instance.
78+
*/
79+
public IncrementalHash32() {
80+
// empty
81+
}
82+
7683
/**
7784
* {@inheritDoc}
7885
*
@@ -155,6 +162,13 @@ private static int orBytes(final byte b1, final byte b2, final byte b3, final by
155162
*/
156163
private int hash;
157164

165+
/**
166+
* Constructs a new instance.
167+
*/
168+
public IncrementalHash32x86() {
169+
// empty
170+
}
171+
158172
/**
159173
* Adds the byte array to the current incremental hash.
160174
*

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,19 @@
3434
public abstract class AbstractCaverphone implements StringEncoder {
3535

3636
/**
37-
* Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of
37+
* Constructs a new instance for subclasses.
38+
*/
39+
public AbstractCaverphone() {
40+
// empty
41+
}
42+
43+
/**
44+
* Encodes an Object using the Caverphone algorithm. This method is provided in order to satisfy the requirements of
3845
* the Encoder interface, and will throw an EncoderException if the supplied object is not of type {@link String}.
3946
*
4047
* @param source
4148
* Object to encode
42-
* @return An object (or type {@link String}) containing the caverphone code which corresponds to the String
49+
* @return An object (or type {@link String}) containing the Caverphone code which corresponds to the String
4350
* supplied.
4451
* @throws EncoderException
4552
* if the parameter supplied is not of type {@link String}.

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

+13-6
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,31 @@ public class Caverphone implements StringEncoder {
3939
*/
4040
private final Caverphone2 encoder = new Caverphone2();
4141

42+
/**
43+
* Constructs a new instance.
44+
*/
45+
public Caverphone() {
46+
// empty
47+
}
48+
4249
/**
4350
* Encodes the given String into a Caverphone value.
4451
*
4552
* @param source
4653
* String the source string
47-
* @return A caverphone code for the given String
54+
* @return A Caverphone code for the given String
4855
*/
4956
public String caverphone(final String source) {
5057
return this.encoder.encode(source);
5158
}
5259

5360
/**
54-
* Encodes an Object using the caverphone algorithm. This method is provided in order to satisfy the requirements of
61+
* Encodes an Object using the Caverphone algorithm. This method is provided in order to satisfy the requirements of
5562
* the Encoder interface, and will throw an EncoderException if the supplied object is not of type {@link String}.
5663
*
5764
* @param obj
5865
* Object to encode
59-
* @return An object (or type {@link String}) containing the caverphone code which corresponds to the String
66+
* @return An object (or type {@link String}) containing the Caverphone code which corresponds to the String
6067
* supplied.
6168
* @throws EncoderException
6269
* if the parameter supplied is not of type {@link String}.
@@ -74,21 +81,21 @@ public Object encode(final Object obj) throws EncoderException {
7481
*
7582
* @param str
7683
* String object to encode
77-
* @return The caverphone code corresponding to the String supplied
84+
* @return The Caverphone code corresponding to the String supplied
7885
*/
7986
@Override
8087
public String encode(final String str) {
8188
return caverphone(str);
8289
}
8390

8491
/**
85-
* Tests if the caverphones of two strings are identical.
92+
* Tests if the Caverphones of two strings are identical.
8693
*
8794
* @param str1
8895
* First of two strings to compare
8996
* @param str2
9097
* Second of two strings to compare
91-
* @return {@code true} if the caverphones of these strings are identical, {@code false} otherwise.
98+
* @return {@code true} if the Caverphones of these strings are identical, {@code false} otherwise.
9299
*/
93100
public boolean isCaverphoneEqual(final String str1, final String str2) {
94101
return caverphone(str1).equals(caverphone(str2));

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ public class Caverphone1 extends AbstractCaverphone {
3333

3434
private static final String SIX_1 = "111111";
3535

36+
/**
37+
* Constructs a new instance.
38+
*/
39+
public Caverphone1() {
40+
// empty
41+
}
42+
3643
/**
3744
* Encodes the given String into a Caverphone value.
3845
*
3946
* @param source
4047
* String the source string
41-
* @return A caverphone code for the given String
48+
* @return A Caverphone code for the given String
4249
*/
4350
@Override
4451
public String encode(final String source) {

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

+8-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ public class Caverphone2 extends AbstractCaverphone {
3333

3434
private static final String TEN_1 = "1111111111";
3535

36+
/**
37+
* Constructs a new instance.
38+
*/
39+
public Caverphone2() {
40+
// empty
41+
}
42+
3643
/**
3744
* Encodes the given String into a Caverphone 2.0 value.
3845
*
3946
* @param source
4047
* String the source string
41-
* @return A caverphone code for the given String
48+
* @return A Caverphone code for the given String
4249
*/
4350
@Override
4451
public String encode(final String source) {

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

+7
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,13 @@ private static boolean arrayContains(final char[] arr, final char key) {
305305
return false;
306306
}
307307

308+
/**
309+
* Constructs a new instance.
310+
*/
311+
public ColognePhonetic() {
312+
// empty
313+
}
314+
308315
/**
309316
* <p>
310317
* Implements the <em>K&ouml;lner Phonetik</em> algorithm.

0 commit comments

Comments
 (0)