public String getName(Key base) { return ref.getName(base); }
public synchronized String getName() { return ref.getName(); }
public synchronized String getName(Key base) { return ref.getName(base); }
public String getName() { return ref.getName(); }
/** * An example of how to search for various bits of data. * * @throws BookException */ public void search() throws BookException { Book bible = Books.installed().getBook(BIBLE_NAME); // This does a standard operator search. See the search documentation // for more examples of how to search Key key = bible.find("+moses +aaron"); System.out.println("The following verses contain both moses and aaron: " + key.getName()); // You can also trim the result to a more manageable quantity. // The test here is not necessary since we are working with a bible. It // is necessary if we don't know what it // is. if (key instanceof Passage) { Passage remaining = ((Passage) key).trimVerses(5); System.out.println("The first 5 verses containing both moses and aaron: " + key.getName()); if (remaining != null) { System.out.println("The rest of the verses are: " + remaining.getName()); } else { System.out.println("There are only 5 verses containing both moses and aaron"); } } }