@Override boolean equalsCommon(CraftMetaItem meta) { if (!super.equalsCommon(meta)) { return false; } if (meta instanceof CraftMetaBook) { CraftMetaBook that = (CraftMetaBook) meta; return (hasTitle() ? that.hasTitle() && this.title.equals(that.title) : !that.hasTitle()) && (hasAuthor() ? that.hasAuthor() && this.author.equals(that.author) : !that.hasAuthor()) && (hasPages() ? that.hasPages() && this.pages.equals(that.pages) : !that.hasPages()); } return true; }
@Override public CraftMetaBook clone() { CraftMetaBook meta = (CraftMetaBook) super.clone(); meta.pages = new ArrayList<String>(pages); return meta; }