1
1
package edu .stanford .nlp .util ;
2
2
3
3
import java .io .DataOutputStream ;
4
- import java .io .Serial ;
5
4
import java .io .Serializable ;
6
5
import java .util .Comparator ;
7
6
import java .util .List ;
@@ -129,12 +128,12 @@ public void save(DataOutputStream out) {
129
128
* If the other object is not a {@code Pair}, it throws a
130
129
* {@code ClassCastException}.
131
130
*
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
134
133
* {@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}
136
135
* 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
138
137
* {@code Pair} less than this {@code Pair}.
139
138
* @throws ClassCastException if the argument is not a
140
139
* {@code Pair}.
@@ -196,7 +195,6 @@ public static Pair<String, String> internedStringPair(String first, String secon
196
195
/**
197
196
* use serialVersionUID for cross version serialization compatibility
198
197
*/
199
- @ Serial
200
198
private static final long serialVersionUID = 1360822168806852921L ;
201
199
202
200
@@ -212,7 +210,6 @@ private MutableInternedPair(String first, String second) {
212
210
internStrings ();
213
211
}
214
212
215
- @ Serial
216
213
protected Object readResolve () {
217
214
internStrings ();
218
215
return this ;
@@ -228,7 +225,6 @@ private void internStrings() {
228
225
}
229
226
230
227
// use serialVersionUID for cross version serialization compatibility
231
- @ Serial
232
228
private static final long serialVersionUID = 1360822168806852922L ;
233
229
234
230
}
@@ -259,8 +255,7 @@ public int compare(Pair<T1, T2> pair1, Pair<T1, T2> pair2) {
259
255
/**
260
256
* Compares a {@code Pair} to another {@code Pair} according to the first object of the pair only in decreasing order
261
257
* 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}
264
259
* @author jonathanberant
265
260
*/
266
261
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) {
275
270
/**
276
271
* Compares a {@code Pair} to another {@code Pair} according to the second object of the pair only
277
272
* 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}
280
274
* @author jonathanberant
281
275
*/
282
276
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) {
291
285
/**
292
286
* Compares a {@code Pair} to another {@code Pair} according to the second object of the pair only in decreasing order
293
287
* 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}
296
289
*
297
290
* @author jonathanberant
298
291
*/
0 commit comments