Ejemplo n.º 1
0
  @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;
  }
Ejemplo n.º 2
0
 @Override
 public CraftMetaBook clone() {
   CraftMetaBook meta = (CraftMetaBook) super.clone();
   meta.pages = new ArrayList<String>(pages);
   return meta;
 }