SplitBySizeParameters extends MultiplePdfSourceMultipleOutputParameters implements OptimizableOutputTaskParameters, DiscardableOutlineTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitBySizeParameters)) { return false; } SplitBySizeParameters parameter = (SplitBySizeParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(sizeToSplitAt, parameter.getSizeToSplitAt()).append(discardOutline, parameter.discardOutline) .isEquals(); } SplitBySizeParameters(long sizeToSplitAt); long getSizeToSplitAt(); @Override OptimizationPolicy getOptimizationPolicy(); @Override void setOptimizationPolicy(OptimizationPolicy optimizationPolicy); @Override boolean discardOutline(); @Override void discardOutline(boolean discardOutline); @Override int hashCode(); @Override boolean equals(Object other);  }
@Test public void testEquals() { SplitBySizeParameters eq1 = new SplitBySizeParameters(10); SplitBySizeParameters eq2 = new SplitBySizeParameters(10); SplitBySizeParameters eq3 = new SplitBySizeParameters(10); SplitBySizeParameters diff = new SplitBySizeParameters(100); diff.setOutputPrefix("prefix"); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }