예제 #1
0
 private void initHyperlinkSet() {
   if (myVisitedHyperlinks == null) {
     myVisitedHyperlinks = new TreeSet<String>();
     if (myId != -1) {
       myVisitedHyperlinks.addAll(BooksDatabase.Instance().loadVisitedHyperlinks(myId));
     }
   }
 }
예제 #2
0
 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);
 }