Exemple #1
0
 private void initHyperlinkSet() {
   if (myVisitedHyperlinks == null) {
     myVisitedHyperlinks = new TreeSet<String>();
     if (myId != -1) {
       myVisitedHyperlinks.addAll(BooksDatabase.Instance().loadVisitedHyperlinks(myId));
     }
   }
 }
 public List<Author> authors() {
   final Set<Author> authors = new TreeSet<Author>();
   synchronized (myBooksByFile) {
     for (Book book : myBooksByFile.values()) {
       final List<Author> bookAuthors = book.authors();
       if (bookAuthors.isEmpty()) {
         authors.add(Author.NULL);
       } else {
         authors.addAll(bookAuthors);
       }
     }
   }
   return new ArrayList<Author>(authors);
 }