- multi generic
https://stackoverflow.com/questions/1759549/java-generics-multiple-generic-parameters
Java generics: multiple generic parameters?
I was wondering if it's possible to write a function that accepts multiple generic types as follows: public int void myfunction(Set<T> a, Set<T> b) { return 5; } Set<Integer>...
stackoverflow.com
https://cornswrold.tistory.com/m/180
[JAVA] 제네릭(Generic) 문법 정리
왜 제네릭을 사용해야 하는가? 제네릭 타입을 이용함으로써 잘못된 타입이 사용될 수 있는 문제를 컴파일 과정에서 제거할 수 있다. 제네릭은 클래스와 인터페이스, 메소드를 정의할 때 타입(typ
cornswrold.tistory.com
E - Element
K - Key
N - Number
T - Type
V - Value
https://lng1982.tistory.com/240
Java Generic 정리
설계를 할때마다 Generic 사용법을 잊어먹는 경우가 많아 이해하기 쉬운 수준으로 정리를 해보려고 한다. Class generic type Class generic type은 다음과 같은 방법으로 클래스가 작성된다. 어떤 경우에 사
lng1982.tistory.com
- E와 T 차이
https://lng1982.tistory.com/70
java generic에서 E와 T 차이
Java generic에는 T(type), E(element) 가 있는데 이 둘의 차이점을 모르겠다. 일단 이 둘의 차이점이 뭔가 확인하기 위해 다음과 같이 테스트 코드를 작성하였다. Element 클래스는 E 를 받을 수 있게 처리
lng1982.tistory.com
- void type
public static <T extends Comparable<? super T>> void sort(List<T> list);
https://stackoverflow.com/questions/30072110/understanding-generic-parameters-with-void-return-types/30072268
Understanding generic parameters with void return types
I'm reviewing the source code for JDK classes. The following method signature has me confused: public static <T extends Comparable<? super T>> void sort(List<T> list); Since the
stackoverflow.com
'java' 카테고리의 다른 글
apache commons project-random, secureRandom, 난수 (0) | 2021.03.22 |
---|---|
6자리 인증번호 생성 예제 (0) | 2021.03.21 |
cannot convert from string to T (0) | 2021.03.18 |
duration과 period (0) | 2020.11.23 |
sha256 암호화 (0) | 2020.11.11 |