@Test public void testEquals() { TraceElement traceElement1 = TraceElement.of("a"); TraceElement traceElement2 = TraceElement.of("b"); ExprAclLine.Builder lineBuilder = ExprAclLine.builder() .setAction(LineAction.PERMIT) .setMatchCondition(FalseExpr.INSTANCE) .setName("name") .setTraceElement(traceElement1); new EqualsTester() .addEqualityGroup( lineBuilder.build(), lineBuilder.build(), new ExprAclLine(LineAction.PERMIT, FalseExpr.INSTANCE, "name", traceElement1)) .addEqualityGroup(lineBuilder.setAction(LineAction.DENY).build()) .addEqualityGroup(lineBuilder.setMatchCondition(TrueExpr.INSTANCE).build()) .addEqualityGroup(lineBuilder.setName("another name").build()) .addEqualityGroup(lineBuilder.setTraceElement(traceElement2).build()) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExprAclLine)) { return false; } ExprAclLine other = (ExprAclLine) obj; return _action == other._action && Objects.equals(_matchCondition, other._matchCondition) && Objects.equals(_name, other._name) && Objects.equals(_traceElement, other._traceElement); }
ExprAclLine extends AclLine { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExprAclLine)) { return false; } ExprAclLine other = (ExprAclLine) obj; return _action == other._action && Objects.equals(_matchCondition, other._matchCondition) && Objects.equals(_name, other._name) && Objects.equals(_traceElement, other._traceElement); } }
ExprAclLine extends AclLine { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExprAclLine)) { return false; } ExprAclLine other = (ExprAclLine) obj; return _action == other._action && Objects.equals(_matchCondition, other._matchCondition) && Objects.equals(_name, other._name) && Objects.equals(_traceElement, other._traceElement); } ExprAclLine(
      @Nonnull LineAction action, @Nonnull AclLineMatchExpr matchCondition, String name);  ExprAclLine(
      @Nonnull LineAction action,
      @Nonnull AclLineMatchExpr matchCondition,
      String name,
      TraceElement traceElement); }
ExprAclLine extends AclLine { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExprAclLine)) { return false; } ExprAclLine other = (ExprAclLine) obj; return _action == other._action && Objects.equals(_matchCondition, other._matchCondition) && Objects.equals(_name, other._name) && Objects.equals(_traceElement, other._traceElement); } ExprAclLine(
      @Nonnull LineAction action, @Nonnull AclLineMatchExpr matchCondition, String name);  ExprAclLine(
      @Nonnull LineAction action,
      @Nonnull AclLineMatchExpr matchCondition,
      String name,
      TraceElement traceElement); static Builder accepting(); @VisibleForTesting static ExprAclLine accepting(AclLineMatchExpr expr); static ExprAclLine accepting(@Nonnull String name, AclLineMatchExpr expr); static ExprAclLine accepting(@Nonnull TraceElement traceElement, AclLineMatchExpr expr); @VisibleForTesting static ExprAclLine acceptingHeaderSpace(HeaderSpace headerSpace); static ExprAclLine acceptingHeaderSpace(@Nonnull String name, HeaderSpace headerSpace); static Builder builder(); static Builder rejecting(); @VisibleForTesting static ExprAclLine rejecting(AclLineMatchExpr expr); static ExprAclLine rejecting(String name, AclLineMatchExpr expr); static ExprAclLine rejecting(@Nonnull TraceElement traceElement, AclLineMatchExpr expr); @VisibleForTesting static ExprAclLine rejectingHeaderSpace(HeaderSpace headerSpace); static ExprAclLine rejectingHeaderSpace(String name, HeaderSpace headerSpace); @Override boolean equals(Object obj); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_MATCH_CONDITION) @Nonnull AclLineMatchExpr getMatchCondition(); @Override R accept(GenericAclLineVisitor<R> visitor); @Override int hashCode(); Builder toBuilder(); @Override String toString(); }
ExprAclLine extends AclLine { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExprAclLine)) { return false; } ExprAclLine other = (ExprAclLine) obj; return _action == other._action && Objects.equals(_matchCondition, other._matchCondition) && Objects.equals(_name, other._name) && Objects.equals(_traceElement, other._traceElement); } ExprAclLine(
      @Nonnull LineAction action, @Nonnull AclLineMatchExpr matchCondition, String name);  ExprAclLine(
      @Nonnull LineAction action,
      @Nonnull AclLineMatchExpr matchCondition,
      String name,
      TraceElement traceElement); static Builder accepting(); @VisibleForTesting static ExprAclLine accepting(AclLineMatchExpr expr); static ExprAclLine accepting(@Nonnull String name, AclLineMatchExpr expr); static ExprAclLine accepting(@Nonnull TraceElement traceElement, AclLineMatchExpr expr); @VisibleForTesting static ExprAclLine acceptingHeaderSpace(HeaderSpace headerSpace); static ExprAclLine acceptingHeaderSpace(@Nonnull String name, HeaderSpace headerSpace); static Builder builder(); static Builder rejecting(); @VisibleForTesting static ExprAclLine rejecting(AclLineMatchExpr expr); static ExprAclLine rejecting(String name, AclLineMatchExpr expr); static ExprAclLine rejecting(@Nonnull TraceElement traceElement, AclLineMatchExpr expr); @VisibleForTesting static ExprAclLine rejectingHeaderSpace(HeaderSpace headerSpace); static ExprAclLine rejectingHeaderSpace(String name, HeaderSpace headerSpace); @Override boolean equals(Object obj); @JsonProperty(PROP_ACTION) @Nonnull LineAction getAction(); @JsonProperty(PROP_MATCH_CONDITION) @Nonnull AclLineMatchExpr getMatchCondition(); @Override R accept(GenericAclLineVisitor<R> visitor); @Override int hashCode(); Builder toBuilder(); @Override String toString(); static final ExprAclLine ACCEPT_ALL; static final ExprAclLine REJECT_ALL; }