@Test public void Equals() { Block block1 = Blocks.group(Blocks.S_FIRST, Blocks.S_REST); Block block2 = Blocks.group(Blocks.S_FIRST); assertFalse(block1.equals(block2)); }
@Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof GroupBlock) { GroupBlock gb = (GroupBlock) o; return Objects.equal(filters, gb.filters) && blocks.equals(gb.blocks); } else { return false; } }
GroupBlock implements ContainerBlock { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof GroupBlock) { GroupBlock gb = (GroupBlock) o; return Objects.equal(filters, gb.filters) && blocks.equals(gb.blocks); } else { return false; } } }
GroupBlock implements ContainerBlock { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof GroupBlock) { GroupBlock gb = (GroupBlock) o; return Objects.equal(filters, gb.filters) && blocks.equals(gb.blocks); } else { return false; } } GroupBlock(List<Block> blocks, Predicate... filters); }
GroupBlock implements ContainerBlock { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof GroupBlock) { GroupBlock gb = (GroupBlock) o; return Objects.equal(filters, gb.filters) && blocks.equals(gb.blocks); } else { return false; } } GroupBlock(List<Block> blocks, Predicate... filters); @Override Predicate not(); @Override @SuppressWarnings("unchecked") R accept(Visitor<R, C> v, C context); @Override Class<? extends Boolean> getType(); List<Block> getBlocks(); @Nullable Predicate getFilters(); @Override BooleanExpression exists(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); }
GroupBlock implements ContainerBlock { @Override public boolean equals(Object o) { if (o == this) { return true; } else if (o instanceof GroupBlock) { GroupBlock gb = (GroupBlock) o; return Objects.equal(filters, gb.filters) && blocks.equals(gb.blocks); } else { return false; } } GroupBlock(List<Block> blocks, Predicate... filters); @Override Predicate not(); @Override @SuppressWarnings("unchecked") R accept(Visitor<R, C> v, C context); @Override Class<? extends Boolean> getType(); List<Block> getBlocks(); @Nullable Predicate getFilters(); @Override BooleanExpression exists(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString();  }