Advertisement
Guest User

Untitled

a guest
Oct 21st, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. public String foundPagesWhichCountainGroupsOfTerms(String termo1, String termo2, String termo3, String utilizador){
  2. Utilizador user = verifyUsers(users, utilizador);
  3. ArrayList<String> links = new ArrayList<>();
  4. for(String term:ucBusca.keySet()){
  5. if(termo1.equals(term)){
  6. links = ucBusca.get(term);
  7. }else if(termo2.equals(term)){
  8. links = ucBusca.get(term);
  9. }else if(termo3.equals(term)) {
  10. links = ucBusca.get(term);
  11. }
  12. }
  13. if(links.isEmpty()){
  14. message = "null";
  15. }else{
  16. if(user.online){
  17. for(String l:links){
  18. message = String.valueOf(links.size());
  19. for(PaginaWeb w:sites){
  20. if(w.url.equals(l)){
  21. message += w.getTitulo()+"|"+w.getUrl()+"|"+w.getCitacao()+";";
  22. }
  23. }
  24. }
  25. }else{
  26. for(String l:links) {
  27. message = String.valueOf(links.size());
  28. }
  29. }
  30.  
  31. }
  32. return message;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement