Code example for BigDecimal

Methods: equals

0
        BookModel bookModel = (BookModel) o;
 
        if (author1 != null ? !author1.equals(bookModel.author1) : bookModel.author1 != null) return false;
        if (author2 != null ? !author2.equals(bookModel.author2) : bookModel.author2 != null) return false;
        if (category != null ? !category.equals(bookModel.category) : bookModel.category != null) return false;
        if (price != null ? !price.equals(bookModel.price) : bookModel.price != null) return false;
        if (publishDate != null ? !publishDate.equals(bookModel.publishDate) : bookModel.publishDate != null)
            return false; 
        if (title != null ? !title.equals(bookModel.title) : bookModel.title != null) return false;
        if (titleLanguage != null ? !titleLanguage.equals(bookModel.titleLanguage) : bookModel.titleLanguage != null)
            return false; 
 
        return true; 
    } 
 
    @Override 
    public String toString() {
        return "BookModel{" + 
                "category='" + category + '\'' +
                ", title='" + title + '\'' +
Contextual code suggestions in your IDE  Get Codota for Java