@@ -295,57 +295,33 @@ static class VavrCollections implements CustomCollectionRegistrar {
295
295
296
296
private static final TypeDescriptor OBJECT_DESCRIPTOR = TypeDescriptor .valueOf (Object .class );
297
297
298
- /*
299
- * (non-Javadoc)
300
- * @see org.springframework.data.util.CustomCollectionRegistrar#isAvailable()
301
- */
302
298
@ Override
303
299
public boolean isAvailable () {
304
300
return ClassUtils .isPresent ("io.vavr.control.Option" , VavrCollections .class .getClassLoader ());
305
301
}
306
302
307
- /*
308
- * (non-Javadoc)
309
- * @see org.springframework.data.util.CustomCollectionRegistrar#getMapTypes()
310
- */
311
303
@ Override
312
304
public Collection <Class <?>> getMapTypes () {
313
305
return Set .of (io .vavr .collection .Map .class );
314
306
}
315
307
316
- /*
317
- * (non-Javadoc)
318
- * @see org.springframework.data.util.CustomCollectionRegistrar#getCollectionTypes()
319
- */
320
308
@ Override
321
309
public Collection <Class <?>> getCollectionTypes () {
322
310
return List .of (Seq .class , io .vavr .collection .Set .class );
323
311
}
324
312
325
- /*
326
- * (non-Javadoc)
327
- * @see org.springframework.data.util.CustomCollectionRegistrar#getAllowedPaginationReturnTypes()
328
- */
329
313
@ Override
330
314
public Collection <Class <?>> getAllowedPaginationReturnTypes () {
331
315
return Set .of (Seq .class );
332
316
}
333
317
334
- /*
335
- * (non-Javadoc)
336
- * @see org.springframework.data.util.CustomCollectionRegistrar#registerConvertersIn(org.springframework.core.convert.converter.ConverterRegistry)
337
- */
338
318
@ Override
339
319
public void registerConvertersIn (ConverterRegistry registry ) {
340
320
341
321
registry .addConverter (JavaToVavrCollectionConverter .INSTANCE );
342
322
registry .addConverter (VavrToJavaCollectionConverter .INSTANCE );
343
323
}
344
324
345
- /*
346
- * (non-Javadoc)
347
- * @see org.springframework.data.util.CustomCollectionRegistrar#toJavaNativeCollection()
348
- */
349
325
@ Override
350
326
@ SuppressWarnings ("null" )
351
327
public Function <Object , Object > toJavaNativeCollection () {
@@ -361,10 +337,6 @@ private enum VavrToJavaCollectionConverter implements ConditionalGenericConverte
361
337
362
338
private static final TypeDescriptor TRAVERSAL_TYPE = TypeDescriptor .valueOf (Traversable .class );
363
339
364
- /*
365
- * (non-Javadoc)
366
- * @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
367
- */
368
340
@ NonNull
369
341
@ Override
370
342
public Set <ConvertiblePair > getConvertibleTypes () {
@@ -374,21 +346,13 @@ public Set<ConvertiblePair> getConvertibleTypes() {
374
346
.collect (Collectors .toSet ());
375
347
}
376
348
377
- /*
378
- * (non-Javadoc)
379
- * @see org.springframework.core.convert.converter.ConditionalConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
380
- */
381
349
@ Override
382
350
public boolean matches (TypeDescriptor sourceType , TypeDescriptor targetType ) {
383
351
384
352
return sourceType .isAssignableTo (TRAVERSAL_TYPE )
385
353
&& COLLECTIONS_AND_MAP .contains (targetType .getType ());
386
354
}
387
355
388
- /*
389
- * (non-Javadoc)
390
- * @see org.springframework.core.convert.converter.GenericConverter#convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
391
- */
392
356
@ Nullable
393
357
@ Override
394
358
public Object convert (@ Nullable Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) {
@@ -428,20 +392,12 @@ private enum JavaToVavrCollectionConverter implements ConditionalGenericConverte
428
392
CONVERTIBLE_PAIRS = Collections .unmodifiableSet (pairs );
429
393
}
430
394
431
- /*
432
- * (non-Javadoc)
433
- * @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
434
- */
435
395
@ NonNull
436
396
@ Override
437
397
public java .util .Set <ConvertiblePair > getConvertibleTypes () {
438
398
return CONVERTIBLE_PAIRS ;
439
399
}
440
400
441
- /*
442
- * (non-Javadoc)
443
- * @see org.springframework.core.convert.converter.ConditionalConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
444
- */
445
401
@ Override
446
402
public boolean matches (TypeDescriptor sourceType , TypeDescriptor targetType ) {
447
403
@@ -459,10 +415,6 @@ public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
459
415
return true ;
460
416
}
461
417
462
- /*
463
- * (non-Javadoc)
464
- * @see org.springframework.core.convert.converter.GenericConverter#convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
465
- */
466
418
@ Nullable
467
419
@ Override
468
420
public Object convert (@ Nullable Object source , TypeDescriptor sourceDescriptor , TypeDescriptor targetDescriptor ) {
@@ -503,48 +455,28 @@ public Object convert(@Nullable Object source, TypeDescriptor sourceDescriptor,
503
455
504
456
static class EclipseCollections implements CustomCollectionRegistrar {
505
457
506
- /*
507
- * (non-Javadoc)
508
- * @see org.springframework.data.util.CustomCollectionRegistrar#isAvailable()
509
- */
510
458
@ Override
511
459
public boolean isAvailable () {
512
460
return ClassUtils .isPresent ("org.eclipse.collections.api.list.ImmutableList" ,
513
461
EclipseCollections .class .getClassLoader ());
514
462
}
515
463
516
- /*
517
- * (non-Javadoc)
518
- * @see org.springframework.data.util.CustomCollectionRegistrar#getCollectionTypes()
519
- */
520
464
@ Override
521
465
public Collection <Class <?>> getCollectionTypes () {
522
466
return List .of (ImmutableList .class , ImmutableSet .class , ImmutableBag .class , MutableList .class , MutableSet .class ,
523
467
MutableBag .class );
524
468
}
525
469
526
- /*
527
- * (non-Javadoc)
528
- * @see org.springframework.data.util.CustomCollectionRegistrar#getMapTypes()
529
- */
530
470
@ Override
531
471
public Collection <Class <?>> getMapTypes () {
532
472
return List .of (ImmutableMap .class , MutableMap .class );
533
473
}
534
474
535
- /*
536
- * (non-Javadoc)
537
- * @see org.springframework.data.util.CustomCollectionRegistrar#getAllowedPaginationReturnTypes()
538
- */
539
475
@ Override
540
476
public Collection <Class <?>> getAllowedPaginationReturnTypes () {
541
477
return List .of (ImmutableList .class , MutableList .class );
542
478
}
543
479
544
- /*
545
- * (non-Javadoc)
546
- * @see org.springframework.data.util.CustomCollectionRegistrar#toJavaNativeCollection()
547
- */
548
480
@ Override
549
481
public Function <Object , Object > toJavaNativeCollection () {
550
482
@@ -553,10 +485,6 @@ public Function<Object, Object> toJavaNativeCollection() {
553
485
: source ;
554
486
}
555
487
556
- /*
557
- * (non-Javadoc)
558
- * @see org.springframework.data.util.CustomCollectionRegistrar#registerConvertersIn(org.springframework.core.convert.converter.ConverterRegistry)
559
- */
560
488
@ Override
561
489
public void registerConvertersIn (ConverterRegistry registry ) {
562
490
@@ -570,21 +498,13 @@ enum EclipseToJavaConverter implements Converter<Object, Object>, ConditionalCon
570
498
571
499
private static final TypeDescriptor RICH_ITERABLE_DESCRIPTOR = TypeDescriptor .valueOf (RichIterable .class );
572
500
573
- /*
574
- * (non-Javadoc)
575
- * @see org.springframework.core.convert.converter.ConditionalConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
576
- */
577
501
@ Override
578
502
public boolean matches (TypeDescriptor sourceType , TypeDescriptor targetType ) {
579
503
580
504
return sourceType .isAssignableTo (RICH_ITERABLE_DESCRIPTOR )
581
505
&& COLLECTIONS_AND_MAP .contains (targetType .getType ());
582
506
}
583
507
584
- /*
585
- * (non-Javadoc)
586
- * @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
587
- */
588
508
@ Nullable
589
509
@ Override
590
510
public Object convert (@ Nullable Object source ) {
@@ -635,20 +555,12 @@ enum JavaToEclipseConverter implements ConditionalGenericConverter {
635
555
CONVERTIBLE_PAIRS = Collections .unmodifiableSet (pairs );
636
556
}
637
557
638
- /*
639
- * (non-Javadoc)
640
- * @see org.springframework.core.convert.converter.GenericConverter#getConvertibleTypes()
641
- */
642
558
@ NonNull
643
559
@ Override
644
560
public Set <ConvertiblePair > getConvertibleTypes () {
645
561
return CONVERTIBLE_PAIRS ;
646
562
}
647
563
648
- /*
649
- * (non-Javadoc)
650
- * @see org.springframework.core.convert.converter.ConditionalConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
651
- */
652
564
@ Override
653
565
public boolean matches (TypeDescriptor sourceType , TypeDescriptor targetType ) {
654
566
@@ -667,10 +579,6 @@ public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
667
579
return true ;
668
580
}
669
581
670
- /*
671
- * (non-Javadoc)
672
- * @see org.springframework.core.convert.converter.GenericConverter#convert(java.lang.Object, org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
673
- */
674
582
@ Nullable
675
583
@ Override
676
584
public Object convert (@ Nullable Object source , TypeDescriptor sourceDescriptor , TypeDescriptor targetDescriptor ) {
0 commit comments