File tree 1 file changed +3
-2
lines changed
1-0-java-basics/1-3-1-crazy-generics/src/main/java/com/bobocode/basics
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import com .bobocode .basics .util .BaseEntity ;
4
4
import lombok .Data ;
5
+ import lombok .val ;
5
6
6
7
import java .io .Serializable ;
7
8
import java .util .*;
@@ -66,7 +67,7 @@ public interface Converter<T, R> {
66
67
*
67
68
* @param <T> – value type
68
69
*/
69
- public static class MaxHolder <T extends Comparable <T >> { // todo: refactor class to make it generic
70
+ public static class MaxHolder <T extends Comparable <? super T >> { // todo: refactor class to make it generic
70
71
private T max ;
71
72
72
73
public MaxHolder (T max ) {
@@ -95,7 +96,7 @@ public T getMax() {
95
96
*
96
97
* @param <T> – the type of objects that can be processed
97
98
*/
98
- interface StrictProcessor <T extends Serializable & Comparable <T >> { // todo: make it generic
99
+ interface StrictProcessor <T extends Serializable & Comparable <? super T >> { // todo: make it generic
99
100
void process (T obj );
100
101
}
101
102
You can’t perform that action at this time.
0 commit comments