@Test public void testEquals() { SplitByOutlineLevelParameters eq1 = new SplitByOutlineLevelParameters(10); SplitByOutlineLevelParameters eq2 = new SplitByOutlineLevelParameters(10); SplitByOutlineLevelParameters eq3 = new SplitByOutlineLevelParameters(10); SplitByOutlineLevelParameters diff = new SplitByOutlineLevelParameters(1); diff.setOutputPrefix("prefix"); diff.setMatchingTitleRegEx("string"); diff.setOptimizationPolicy(OptimizationPolicy.AUTO); TestUtils.testEqualsAndHashCodes(eq1, eq2, eq3, diff); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitByOutlineLevelParameters)) { return false; } SplitByOutlineLevelParameters parameter = (SplitByOutlineLevelParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(discardOutline, parameter.discardOutline()) .append(levelToSplitAt, parameter.getLevelToSplitAt()) .append(matchingTitleRegEx, parameter.getMatchingTitleRegEx()).isEquals(); }
SplitByOutlineLevelParameters extends MultiplePdfSourceMultipleOutputParameters implements OptimizableOutputTaskParameters, DiscardableOutlineTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitByOutlineLevelParameters)) { return false; } SplitByOutlineLevelParameters parameter = (SplitByOutlineLevelParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(discardOutline, parameter.discardOutline()) .append(levelToSplitAt, parameter.getLevelToSplitAt()) .append(matchingTitleRegEx, parameter.getMatchingTitleRegEx()).isEquals(); } }
SplitByOutlineLevelParameters extends MultiplePdfSourceMultipleOutputParameters implements OptimizableOutputTaskParameters, DiscardableOutlineTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitByOutlineLevelParameters)) { return false; } SplitByOutlineLevelParameters parameter = (SplitByOutlineLevelParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(discardOutline, parameter.discardOutline()) .append(levelToSplitAt, parameter.getLevelToSplitAt()) .append(matchingTitleRegEx, parameter.getMatchingTitleRegEx()).isEquals(); } SplitByOutlineLevelParameters(int levelToSplitAt); }
SplitByOutlineLevelParameters extends MultiplePdfSourceMultipleOutputParameters implements OptimizableOutputTaskParameters, DiscardableOutlineTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitByOutlineLevelParameters)) { return false; } SplitByOutlineLevelParameters parameter = (SplitByOutlineLevelParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(discardOutline, parameter.discardOutline()) .append(levelToSplitAt, parameter.getLevelToSplitAt()) .append(matchingTitleRegEx, parameter.getMatchingTitleRegEx()).isEquals(); } SplitByOutlineLevelParameters(int levelToSplitAt); @Override OptimizationPolicy getOptimizationPolicy(); @Override void setOptimizationPolicy(OptimizationPolicy optimizationPolicy); @Override boolean discardOutline(); @Override void discardOutline(boolean discardOutline); int getLevelToSplitAt(); String getMatchingTitleRegEx(); void setMatchingTitleRegEx(String matchingTitleRegEx); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); }
SplitByOutlineLevelParameters extends MultiplePdfSourceMultipleOutputParameters implements OptimizableOutputTaskParameters, DiscardableOutlineTaskParameters { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof SplitByOutlineLevelParameters)) { return false; } SplitByOutlineLevelParameters parameter = (SplitByOutlineLevelParameters) other; return new EqualsBuilder().appendSuper(super.equals(other)) .append(optimizationPolicy, parameter.getOptimizationPolicy()) .append(discardOutline, parameter.discardOutline()) .append(levelToSplitAt, parameter.getLevelToSplitAt()) .append(matchingTitleRegEx, parameter.getMatchingTitleRegEx()).isEquals(); } SplitByOutlineLevelParameters(int levelToSplitAt); @Override OptimizationPolicy getOptimizationPolicy(); @Override void setOptimizationPolicy(OptimizationPolicy optimizationPolicy); @Override boolean discardOutline(); @Override void discardOutline(boolean discardOutline); int getLevelToSplitAt(); String getMatchingTitleRegEx(); void setMatchingTitleRegEx(String matchingTitleRegEx); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other);  }