Skip to content

Commit a000fe3

Browse files
committed
Javadoc and Java 8 fixes
1 parent 86b6a03 commit a000fe3

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/edu/stanford/nlp/util/Pair.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package edu.stanford.nlp.util;
22

33
import java.io.DataOutputStream;
4-
import java.io.Serial;
54
import java.io.Serializable;
65
import java.util.Comparator;
76
import java.util.List;
@@ -129,12 +128,12 @@ public void save(DataOutputStream out) {
129128
* If the other object is not a {@code Pair}, it throws a
130129
* {@code ClassCastException}.
131130
*
132-
* @param another the <code>Object</code> to be compared.
133-
* @return the value <code>0</code> if the argument is a
131+
* @param another the {@code Object} to be compared.
132+
* @return the value {@code 0} if the argument is a
134133
* {@code Pair} equal to this {@code Pair}; a value less than
135-
* <code>0</code> if the argument is a {@code Pair}
134+
* {@code 0} if the argument is a {@code Pair}
136135
* greater than this {@code Pair}; and a value
137-
* greater than <code>0</code> if the argument is a
136+
* greater than {@code 0} if the argument is a
138137
* {@code Pair} less than this {@code Pair}.
139138
* @throws ClassCastException if the argument is not a
140139
* {@code Pair}.
@@ -196,7 +195,6 @@ public static Pair<String, String> internedStringPair(String first, String secon
196195
/**
197196
* use serialVersionUID for cross version serialization compatibility
198197
*/
199-
@Serial
200198
private static final long serialVersionUID = 1360822168806852921L;
201199

202200

@@ -212,7 +210,6 @@ private MutableInternedPair(String first, String second) {
212210
internStrings();
213211
}
214212

215-
@Serial
216213
protected Object readResolve() {
217214
internStrings();
218215
return this;
@@ -228,7 +225,6 @@ private void internStrings() {
228225
}
229226

230227
// use serialVersionUID for cross version serialization compatibility
231-
@Serial
232228
private static final long serialVersionUID = 1360822168806852922L;
233229

234230
}
@@ -259,8 +255,7 @@ public int compare(Pair<T1, T2> pair1, Pair<T1, T2> pair2) {
259255
/**
260256
* Compares a {@code Pair} to another {@code Pair} according to the first object of the pair only in decreasing order
261257
* This function will work providing
262-
* the first element of the {@code Pair} is comparable, otherwise will throw a
263-
* <code>ClassCastException</code>
258+
* the first element of the {@code Pair} is comparable, otherwise will throw a {@code ClassCastException}
264259
* @author jonathanberant
265260
*/
266261
public static class ByFirstReversePairComparator<T1,T2> implements Comparator<Pair<T1,T2>> {
@@ -275,8 +270,7 @@ public int compare(Pair<T1, T2> pair1, Pair<T1, T2> pair2) {
275270
/**
276271
* Compares a {@code Pair} to another {@code Pair} according to the second object of the pair only
277272
* This function will work providing
278-
* the first element of the {@code Pair} is comparable, otherwise will throw a
279-
* <code>ClassCastException</code>
273+
* the first element of the {@code Pair} is comparable, otherwise will throw a {@code ClassCastException}
280274
* @author jonathanberant
281275
*/
282276
public static class BySecondPairComparator<T1,T2> implements Comparator<Pair<T1,T2>> {
@@ -291,8 +285,7 @@ public int compare(Pair<T1, T2> pair1, Pair<T1, T2> pair2) {
291285
/**
292286
* Compares a {@code Pair} to another {@code Pair} according to the second object of the pair only in decreasing order
293287
* This function will work providing
294-
* the first element of the {@code Pair} is comparable, otherwise will throw a
295-
* <code>ClassCastException</code>
288+
* the first element of the {@code Pair} is comparable, otherwise will throw a {@code ClassCastException}
296289
*
297290
* @author jonathanberant
298291
*/

0 commit comments

Comments
 (0)