public int compare(Book o1, Book o2) { return o1.getAbbreviation().compareToIgnoreCase(o2.getAbbreviation()); } });
@Override public int hashCode() { return book.getAbbreviation().hashCode(); } }
public String getCssClassForCustomFont(Book book) { return fontProperties.getProperty(book.getAbbreviation()+CSS_CLASS, ""); }
@Override protected String getTitle() { if (mSuggestedDocument!=null) { return titleSplitter.shorten(mSuggestedDocument.getAbbreviation(), ACTION_BUTTON_MAX_CHARS); } else { return ""; } }
@Override public String getDescription() { StringBuilder desc = new StringBuilder(); try { String verseDesc = CommonUtils.getKeyDescription(key); desc.append(document.getAbbreviation()).append(" ").append(verseDesc); } catch (Exception e) { Log.e(TAG, "Error getting description", e); } return desc.toString(); }
@Override public boolean equals(Object obj) { // The real bit ... Book thatBook = ((BookKey)obj).book; return book.getBookCategory().equals(thatBook.getBookCategory()) && book.getAbbreviation().equals(thatBook.getAbbreviation()) && book.getLanguage().equals(thatBook.getLanguage()); }
if (book.getAbbreviation().startsWith("NET") ) //$NON-NLS-1$ //$NON-NLS-2$ if (book.getAbbreviation().startsWith("WEB") && key instanceof Verse ) //$NON-NLS-1$ //$NON-NLS-2$
public String getFontForBook(Book book) { String font = null; try { if (book!=null) { // sometimes an error occurs on following line - maybe due to missing language info in book metadata String langCode = book.getBookMetaData().getLanguage().getCode(); // is there a font for the book final String abbreviation = book.getAbbreviation(); font = fontProperties.getProperty(abbreviation); // is there a font for the language code if (StringUtils.isEmpty(font)) { font = fontProperties.getProperty(langCode); } log.debug("Book:" + abbreviation + " Language code:" + langCode + " Font:" + font); } } catch (Exception e) { // sometimes get here if a book has no initials - so do not attempt to print a books initials in the error log.warn("Problem getting font for book", e); } return font; }
if (textView1!=null) { Book book = translationDto.getBook(); textView1.setText(book.getAbbreviation());
String initials = document.getAbbreviation(); view.getText1().setText(initials);
Book book = item.getSpeakBook(); if(isSpeak && book != null) { view.getVerseText().setText(key + " (" + book.getAbbreviation() + ")"); }else { view.getVerseText().setText(key);
String initials = document.getAbbreviation(); view.getText1().setText(initials);