Esempio n. 1
0
  /**
   * Fill bacheca.
   *
   * @param listaPost the lista post
   * @return the string
   */
  private String fillBacheca(List<Post> listaPost) {

    String bacheca = "";
    if (listaPost != null) {
      for (Post post : listaPost) {

        bacheca += post.toStringViewBacheca(post);
      }
    }
    return bacheca;
  }
Esempio n. 2
0
  /**
   * Removes the post not matching.
   *
   * @param idBacheca the id bacheca
   */
  private void removePostNotMatching(final int idBacheca) {
    Set<Post> list = new HashSet<Post>();

    for (Post post : listaPost) {
      if (post.getBachecaClasse() == null) list.add(post);
    }
    listaPost.removeAll(list);
    list = new HashSet<Post>();

    for (Post post : listaPost) {
      if (post.getBachecaClasse().getId_bacheca_classe() != idBacheca) list.add(post);
    }
    listaPost.removeAll(list);
  }