@@ -209,6 +209,26 @@ public String toString() {
209
209
return String .format ("[items=%s, skips=%s]" , items , skips );
210
210
}
211
211
212
+ @ Override
213
+ public boolean equals (Object o ) {
214
+ if (this == o ) {
215
+ return true ;
216
+ }
217
+ if (!(o instanceof Chunk )) {
218
+ return false ;
219
+ }
220
+
221
+ Chunk <?> chunk = (Chunk <?>) o ;
222
+ return end == chunk .end && busy == chunk .busy && Objects .equals (items , chunk .items )
223
+ && Objects .equals (skips , chunk .skips ) && Objects .equals (errors , chunk .errors )
224
+ && Objects .equals (userData , chunk .userData );
225
+ }
226
+
227
+ @ Override
228
+ public int hashCode () {
229
+ return Objects .hash (items , skips , errors , userData , end , busy );
230
+ }
231
+
212
232
/**
213
233
* Special iterator for a chunk providing the {@link #remove(Throwable)} method for
214
234
* dynamically removing an item and adding it to the skips.
@@ -260,25 +280,6 @@ public String toString() {
260
280
return String .format ("[items=%s, skips=%s]" , items , skips );
261
281
}
262
282
263
- @ Override
264
- public int hashCode () {
265
- return Objects .hash (items , skips , errors , userData , end , busy );
266
- }
267
-
268
- @ Override
269
- public boolean equals (Object obj ) {
270
- if (this == obj ) {
271
- return true ;
272
- }
273
- if (!(obj instanceof Chunk )) {
274
- return false ;
275
- }
276
- Chunk <?> other = (Chunk <?>) obj ;
277
- return Objects .equals (items , other .items ) && Objects .equals (skips , other .skips )
278
- && Objects .equals (errors , other .errors ) && Objects .equals (userData , other .userData )
279
- && end == other .end && busy == other .busy ;
280
- }
281
-
282
283
}
283
284
284
285
}
0 commit comments