Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. private static void listErrors(Spelling sp, Scanner in) {
  2. // TODO Auto-generated method stub
  3.  
  4. String textId = in.next();
  5. Text aux = sp.find(textId);
  6. Iterator<Integer> ite;
  7. Iterator<Entry<String,WordError>> error;
  8.  
  9. if (aux != null) {
  10. error = aux.listErradas();
  11. if (sp.existeErros(aux)) {
  12. while (error.hasNext()) {
  13. Entry<String,WordError> ze = error.next();
  14. System.out.println(ze.getKey());
  15. ite = ze.getValue().iterador();
  16. while(ite.hasNext()){
  17. System.out.println(ite.next());
  18. }
  19. }
  20. } else
  21. System.out.println(NOERRORS);
  22.  
  23. } else
  24. System.out.println(INEXISTENTTEXT);
  25.  
  26. System.out.println();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement