TreeMap 버전을 하위 클래스로 확장하여 단어를 효율적으로 인덱싱하려고하지만 올바른 구문이 무엇인지 확신 할 수 없습니다. 트리 맵의 클래스 정의는상위 클래스의 매개 변수가 클래스를 확장하는 클래스를 확장하는 경우
public class MyTreeMap<K extends Comparable<? super K>,V> extends AbstractMap<K,V> {
가장 간단한 방법
public class TreeMapIndexer<K> extends MyTreeMap<K,LinkedList<Integer>> {
의 클래스 확장과 같은 오류 "바운드 불일치 산출 : 타입 K가 경계에 대한 유효한 대체하지 않습니다를 매개 변수> 유형 MyTreeMap ".
내가 대신public class TreeMapIndexer<K> extends
MyTreeMap<K extends Comparable<? super K>, LinkedList<Integer>> {
을 시도했지만 그 "토큰에 구문 오류"컴파일러 오류를 얻을 ", 예상"확장합니다. 잘못된 확장은 ""안에 있습니다.
같은 오류 메시지가 표시된 다른 스레드 (Generic Generics: "Syntax error on token "extends", , expected")가 있습니다. 그것은 나보다 약간 다른 상황 것으로 보인다,하지만 난 "토큰에 구문 오류"정확히 같은를 얻을 수
public class TreeMapIndexer<K> extends
MyTreeMap<K, K extends Comparable<? super K>, LinkedList<Integer>> {
을 시도 확장 "예상"컴파일러 메시지.