Skip to content

Commit c8f6c1f

Browse files
committed
Fix Javadoc errors reported by Javadoc lint
1 parent b472d4c commit c8f6c1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+203
-180
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,6 @@
258258
<configuration>
259259
<show>public</show>
260260
<nohelp>true</nohelp>
261-
<additionalparam>-Xdoclint:none</additionalparam>
262261
</configuration>
263262
</execution>
264263
</executions>

src/main/java/org/culturegraph/mf/biblio/marc21/Marc21Decoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
* <li>multipart resource record level.
5656
* </ul>
5757
* This information is emitted as an entity named
58-
* &quot;{@value Marc21EventNames#LEADER_ENTITY}&quot. It is emitted directly
58+
* &quot;{@value Marc21EventNames#LEADER_ENTITY}&quot;. It is emitted directly
5959
* after the <i>start-record</i> event. The entity contains the following
6060
* literals:
6161
* <ol>

src/main/java/org/culturegraph/mf/commons/Require.java

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ private Require() {
3131
* Throws an {@link IllegalArgumentException} if {@code object} is
3232
* {@literal null}.
3333
*
34-
* @return {@code object}
34+
* @param <T> type of the object passed as parameter
35+
* @param object reference to be checked
36+
* @return the {@code object}
3537
*/
3638
public static <T> T notNull(final T object) {
3739
return notNull(object, "parameter must not be null");
@@ -41,9 +43,10 @@ public static <T> T notNull(final T object) {
4143
* Throws an {@link IllegalArgumentException} if {@code object} is
4244
* {@literal null}.
4345
*
44-
* @param message
45-
* exception message
46-
* @return {@code object}
46+
* @param <T> type of the object passed as parameter
47+
* @param object reference to be checked
48+
* @param message exception message
49+
* @return the {@code object}
4750
*/
4851
public static <T> T notNull(final T object, final String message) {
4952
if (object == null) {
@@ -55,7 +58,8 @@ public static <T> T notNull(final T object, final String message) {
5558
/**
5659
* Throws an {@link IllegalArgumentException} if {@code value} is negative.
5760
*
58-
* @return {@code value}
61+
* @param value the value to be checked
62+
* @return the {@code value}
5963
*/
6064
public static int notNegative(final int value) {
6165
return notNegative(value, "parameter must not be negative");
@@ -64,9 +68,9 @@ public static int notNegative(final int value) {
6468
/**
6569
* Throws an {@link IllegalArgumentException} if {@code value} is negative.
6670
*
67-
* @param message
68-
* exception message
69-
* @return {@code value}
71+
* @param value the value to be checked
72+
* @param message exception message
73+
* @return the {@code value}
7074
*/
7175
public static int notNegative(final int value, final String message) {
7276
if (value < 0) {
@@ -77,6 +81,8 @@ public static int notNegative(final int value, final String message) {
7781

7882
/**
7983
* Throws an {@link IllegalArgumentException} if {@code condition} is false.
84+
*
85+
* @param condition the condition to be checked
8086
*/
8187
public static void that(final boolean condition) {
8288
that(condition, "parameter is not valid");
@@ -85,8 +91,8 @@ public static void that(final boolean condition) {
8591
/**
8692
* Throws an {@link IllegalArgumentException} if {@code condition} is false.
8793
*
88-
* @param message
89-
* exception message
94+
* @param condition the condition to be checked
95+
* @param message exception message
9096
*/
9197
public static void that(final boolean condition, final String message) {
9298
if (!condition) {
@@ -98,7 +104,9 @@ public static void that(final boolean condition, final String message) {
98104
* Throws an {@link IndexOutOfBoundsException} if {@code index} is negative
99105
* or equal to or greater than {@code arrayLength}.
100106
*
101-
* @return {@code index}
107+
* @param index the index value to be checked
108+
* @param arrayLength the upper bound against which {@code index} is checked
109+
* @return the {@code index}
102110
*/
103111
public static int validArrayIndex(final int index, final int arrayLength) {
104112
return validArrayIndex(index, arrayLength, "array index out of range");
@@ -108,9 +116,10 @@ public static int validArrayIndex(final int index, final int arrayLength) {
108116
* Throws an {@link IndexOutOfBoundsException} if {@code index} is negative
109117
* or equal to or greater than {@code arrayLength}.
110118
*
111-
* @param message
112-
* exception message
113-
* @return {@code index}
119+
* @param index the index value to be checked
120+
* @param arrayLength the upper bound against which {@code index} is checked
121+
* @param message exception message
122+
* @return the {@code index}
114123
*/
115124
public static int validArrayIndex(final int index, final int arrayLength,
116125
final String message) {
@@ -125,6 +134,10 @@ public static int validArrayIndex(final int index, final int arrayLength,
125134
* {@code sliceLength} is negative or the sum of both is greater than
126135
* {@code arrayLength}. Note that this means that a slice of length zero
127136
* starting at array length is a valid slice.
137+
*
138+
* @param sliceFrom the start index of the slice to be checked
139+
* @param sliceLength the length of the slice to be checked
140+
* @param arrayLength the upper bound against which the slice is checked
128141
*/
129142
public static void validArraySlice(final int sliceFrom,
130143
final int sliceLength, final int arrayLength) {
@@ -139,8 +152,10 @@ public static void validArraySlice(final int sliceFrom,
139152
* starting at array length is a valid slice.
140153
*
141154
*
142-
* @param message
143-
* exception message
155+
* @param sliceFrom the start index of the slice to be checked
156+
* @param sliceLength the length of the slice to be checked
157+
* @param arrayLength the upper bound against which the slice is checked
158+
* @param message exception message
144159
*/
145160
public static void validArraySlice(final int sliceFrom,
146161
final int sliceLength, final int arrayLength, final String message) {

src/main/java/org/culturegraph/mf/commons/StringUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static String format(final String format, final String varStartIndicator,
101101
* Copies the contents of {@code str} into the {@code currentBuffer}. If the size of
102102
* the buffer is not sufficient to store the string then a new buffer is allocated.
103103
* {@code copyToBuffer} is intended to be used as shown in the example:
104-
* <pre>
104+
* <pre>{@code
105105
* final int INITIAL_SIZE = 10;
106106
* char[] myBuffer = new char[INITIAL_SIZE];
107107
*
@@ -112,7 +112,7 @@ public static String format(final String format, final String varStartIndicator,
112112
* // Process data in myBuffer in the range from 0 to dataLen
113113
* }
114114
* myBuffer = null;
115-
* </pre>
115+
* }</pre>
116116
*
117117
* This allows the buffer to be reused but at the same time frees the user from
118118
* having to manage the size of the buffer.

src/main/java/org/culturegraph/mf/commons/XmlUtil.java

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

3232

3333
/**
34-
* @author Christoph Böhme <c.boehme@dnb.de>
34+
* Utility functions for working with XML data as strings.
3535
*
36+
* @author Christoph Böhme
3637
*/
3738
public final class XmlUtil {
3839

src/main/java/org/culturegraph/mf/commons/tries/ACNode.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@
2121

2222

2323
/**
24-
* @author Markus Michael Geipel
24+
* Node representing a character in a trie.
2525
*
26-
* @param <P>
26+
* @param <P> type of the value associated with this node in the trie.
27+
* @author Markus Michael Geipel
2728
*/
2829
final class ACNode<P> {
2930

src/main/java/org/culturegraph/mf/commons/tries/CharMap.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
import java.util.Set;
2222

2323
/**
24-
* A {@link Map} with char as key. Used for set matching, tries etc. <br>
25-
* <strong>Important:</strong> It is optimized for size in memory. No extra information for fast entry/keySet/values iteration etc. is held.
24+
* A {@link Map} with char as key. Used for set matching, tries etc.
2625
*
27-
* @author Markus Michael Geipel
26+
* <strong>Important:</strong> It is optimized for size in memory. No extra
27+
* information for fast entry/keySet/values iteration etc. is held.
2828
*
29-
* @param <V>
29+
* @param <V> type of the values in the map
30+
* @author Markus Michael Geipel
3031
*/
3132
final class CharMap<V> implements Map<Character, V> {
3233

@@ -88,11 +89,6 @@ public V put(final Character key, final V value) {
8889
return null;
8990
}
9091

91-
/**
92-
* @param key
93-
* @param value
94-
* @return the parameter value
95-
*/
9692
public void put(final char key, final V value) {
9793
if (size > LOAD_FACTOR * table.length) {
9894
expand();
@@ -190,8 +186,9 @@ public Set<java.util.Map.Entry<Character, V>> entrySet() {
190186
}
191187

192188
/**
189+
* Entry in the map.
193190
*
194-
* @param <V>
191+
* @param <V> type of the value of the entry.
195192
*/
196193
private static final class Entry<V> implements Map.Entry<Character, V> {
197194
private final char key;
@@ -236,5 +233,7 @@ public V setValue(final V value) {
236233
public String toString() {
237234
return key + "=" + value;
238235
}
236+
239237
}
238+
240239
}

src/main/java/org/culturegraph/mf/commons/tries/SetMatcher.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@
2323
import java.util.Queue;
2424

2525
/**
26-
* Implementation of the Aho-Corasick algorithm
26+
* Implementation of the Aho-Corasick algorithm.
2727
*
28+
* @param <T> type of stored value
2829
* @author Markus Michael Geipel
29-
*
30-
* @param <T>
31-
* type of value stored
3230
*/
3331
public final class SetMatcher<T> {
34-
private final ACNode<T> root = new ACNode<T>(null, 0);
32+
private final ACNode<T> root = new ACNode<>(null, 0);
3533
private boolean isPrepared;
3634

3735
public void put(final String key, final T value) {
@@ -129,9 +127,10 @@ private void prepare() {
129127
}
130128

131129
/**
132-
* prints dot description of the automaton to out for visualization in GraphViz. Used for debugging and education.
130+
* Prints dot description of the automaton to out for visualization in
131+
* GraphViz. Used for debugging and education.
133132
*
134-
* @param out
133+
* @param out the stream t which the description is written
135134
*/
136135
public void printAutomaton(final PrintStream out) {
137136
out.println("digraph ahocorasick {");
@@ -156,8 +155,9 @@ private void printDebug(final PrintStream out, final ACNode<T> node) {
156155
}
157156

158157
/**
158+
* Describes a match.
159159
*
160-
* @param <T>
160+
* @param <T> type of the stored value
161161
*/
162162
public static final class Match<T> {
163163
private final T value;
@@ -187,5 +187,7 @@ public int getLength() {
187187
public String toString() {
188188
return value + " " + start + "+" + length;
189189
}
190+
190191
}
192+
191193
}

src/main/java/org/culturegraph/mf/commons/tries/SimpleRegexTrie.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public SimpleRegexTrie() {
3939
* Enables the use of simple character classes like 'a[agt][ac]'. Calls the
4040
* method of {@link WildcardTrie} for further treatment.
4141
*
42-
* @param keys
43-
* @param value
42+
* @param keys pattern of keys
43+
* @param value value to associate with the key pattern
4444
*/
4545
public void put(final String keys, final P value) {
4646
if (keys.matches(".*" + SIMPLE_CHARACTER_CLASS + ".*")) {

src/main/java/org/culturegraph/mf/commons/tries/SimpleTrie.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
package org.culturegraph.mf.commons.tries;
1717

1818
/**
19-
* A simple Trie, nothing fancy at all
19+
* A simple Trie, nothing fancy at all.
2020
*
21-
* @author Markus Michael Geipel
22-
2321
* @param <P> type of value stored
22+
* @author Markus Michael Geipel
2423
*/
2524
public final class SimpleTrie<P> {
26-
private final Node<P> root = new Node<P>(null);
25+
private final Node<P> root = new Node<>(null);
2726

2827
public void put(final String key, final P value){
2928

@@ -58,8 +57,9 @@ public P get(final String key){
5857
}
5958

6059
/**
60+
* Node in the trie.
6161
*
62-
* @param <P>
62+
* @param <P> type of the value associated with this node.
6363
*/
6464
private static final class Node<P> {
6565
private final P value;

0 commit comments

Comments
 (0)