@@ -209,6 +209,30 @@ 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
+
218
+ if (!(o instanceof Chunk )) {
219
+ return false ;
220
+ }
221
+
222
+ Chunk <?> chunk = (Chunk <?>) o ;
223
+ return end == chunk .end &&
224
+ busy == chunk .busy &&
225
+ Objects .equals (items , chunk .items ) &&
226
+ Objects .equals (skips , chunk .skips ) &&
227
+ Objects .equals (errors , chunk .errors ) &&
228
+ Objects .equals (userData , chunk .userData );
229
+ }
230
+
231
+ @ Override
232
+ public int hashCode () {
233
+ return Objects .hash (items , skips , errors , userData , end , busy );
234
+ }
235
+
212
236
/**
213
237
* Special iterator for a chunk providing the {@link #remove(Throwable)} method for
214
238
* dynamically removing an item and adding it to the skips.
@@ -260,25 +284,6 @@ public String toString() {
260
284
return String .format ("[items=%s, skips=%s]" , items , skips );
261
285
}
262
286
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
287
}
283
288
284
289
}
0 commit comments