Olá, professor e monitores,
Estava terminando o EP5 e sugiram algumas dúvidas:
1) "Nesta tarefa vocês deverão acrescentar um método keysWithPrefixByValue()"
É pedido para implementarmos o método keysWithPrefixByValue(), mas mais adiante no texto: "Na segunda vez as chaves são exibidas em ordem decrescente de valores. É nessa segunda vez que seu método prefixMatchByValue()" Qual deve ser o nome do nosso método?
2) Tentei rodar o Autocomplete, mas surgiram os seguintes erros:
$ javac-algs4 AutocompleteGUI.java
AutocompleteGUI.java:198: warning: [rawtypes] found raw type: JList
private JList suggestions; // a list of autocomplete matches (Java 6)
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:302: warning: [rawtypes] found raw type: JList
suggestions = new JList(results);
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:302: warning: [unchecked] unchecked call to JList(E[]) as a member of the raw type JList
suggestions = new JList(results);
^
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:311: warning: [unchecked] unchecked call to setPrototypeCellValue(E) as a member of the raw type JList
suggestions.setPrototypeCellValue(suggListLen);
^
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:424: warning: [rawtypes] found raw type: JList
JList theList = (JList) mouseEvent.getSource();
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:441: warning: [rawtypes] found raw type: JList
JList theList = (JList) mouseEvent.getSource();
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:460: warning: [rawtypes] found raw type: JList
JList theList = (JList) mouseEvent.getSource();
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:476: warning: [rawtypes] found raw type: JList
JList theList = (JList) mouseEvent.getSource();
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:485: warning: [rawtypes] found raw type: JList
JList theList = (JList) mouseEvent.getSource();
^
missing type arguments for generic class JList<E>
where E is a type-variable:
E extends Object declared in class JList
AutocompleteGUI.java:584: warning: [unchecked] unchecked call to setListData(E[]) as a member of the raw type JList
suggestions.setListData(new String[0]);
^
where E is a type-variable:
E extends Object declared in class JList
Note: AutocompleteGUI.java has additional unchecked or unsafe operations.
10 warnings
E na hora de execução:
$ java-algs4 AutocompleteGUI
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at AutocompleteGUI.main(AutocompleteGUI.java:747)