@Override public boolean apply(@Nullable Duplicate input) { if (input instanceof InnerDuplicate) { checkArgument( !original.equals(input.getTextBlock()), "TextBlock of an InnerDuplicate can not be the original TextBlock"); } return true; }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Duplication that = (Duplication) o; return original.equals(that.original) && duplicates.equals(that.duplicates); }