@Test public void testEquals() { SessionMatchExpr expr = new SessionMatchExpr(IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), null, null); new EqualsTester() .addEqualityGroup( expr, expr, new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), null, null)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.TCP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), null, null)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.3"), null, null)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.2.2"), Ip.parse("1.1.2.2"), null, null)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), 4000, 5000), new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), 4000, 5000)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), 4040, 5000)) .addEqualityGroup( new SessionMatchExpr( IpProtocol.ICMP, Ip.parse("1.1.1.2"), Ip.parse("1.1.2.2"), 4000, 5050)) .testEquals(); }
@Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof SessionMatchExpr)) { return false; } SessionMatchExpr rhs = (SessionMatchExpr) o; return Objects.equals(_ipProtocol, rhs._ipProtocol) && Objects.equals(_srcIp, rhs._srcIp) && Objects.equals(_dstIp, rhs._dstIp) && Objects.equals(_srcPort, rhs._srcPort) && Objects.equals(_dstPort, rhs._dstPort); }
SessionMatchExpr { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof SessionMatchExpr)) { return false; } SessionMatchExpr rhs = (SessionMatchExpr) o; return Objects.equals(_ipProtocol, rhs._ipProtocol) && Objects.equals(_srcIp, rhs._srcIp) && Objects.equals(_dstIp, rhs._dstIp) && Objects.equals(_srcPort, rhs._srcPort) && Objects.equals(_dstPort, rhs._dstPort); } }
SessionMatchExpr { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof SessionMatchExpr)) { return false; } SessionMatchExpr rhs = (SessionMatchExpr) o; return Objects.equals(_ipProtocol, rhs._ipProtocol) && Objects.equals(_srcIp, rhs._srcIp) && Objects.equals(_dstIp, rhs._dstIp) && Objects.equals(_srcPort, rhs._srcPort) && Objects.equals(_dstPort, rhs._dstPort); } SessionMatchExpr(
      IpProtocol ipProtocol,
      Ip srcIp,
      Ip dstIp,
      @Nullable Integer srcPort,
      @Nullable Integer dstPort); }
SessionMatchExpr { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof SessionMatchExpr)) { return false; } SessionMatchExpr rhs = (SessionMatchExpr) o; return Objects.equals(_ipProtocol, rhs._ipProtocol) && Objects.equals(_srcIp, rhs._srcIp) && Objects.equals(_dstIp, rhs._dstIp) && Objects.equals(_srcPort, rhs._srcPort) && Objects.equals(_dstPort, rhs._dstPort); } SessionMatchExpr(
      IpProtocol ipProtocol,
      Ip srcIp,
      Ip dstIp,
      @Nullable Integer srcPort,
      @Nullable Integer dstPort); @JsonProperty(PROP_IP_PROTOCOL) IpProtocol getIpProtocol(); @JsonProperty(PROP_SRC_IP) Ip getSrcIp(); @JsonProperty(PROP_DST_IP) Ip getDstIp(); @JsonProperty(PROP_SRC_PORT) @Nullable Integer getSrcPort(); @JsonProperty(PROP_DST_PORT) @Nullable Integer getDstPort(); AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); }
SessionMatchExpr { @Override public boolean equals(@Nullable Object o) { if (this == o) { return true; } if (!(o instanceof SessionMatchExpr)) { return false; } SessionMatchExpr rhs = (SessionMatchExpr) o; return Objects.equals(_ipProtocol, rhs._ipProtocol) && Objects.equals(_srcIp, rhs._srcIp) && Objects.equals(_dstIp, rhs._dstIp) && Objects.equals(_srcPort, rhs._srcPort) && Objects.equals(_dstPort, rhs._dstPort); } SessionMatchExpr(
      IpProtocol ipProtocol,
      Ip srcIp,
      Ip dstIp,
      @Nullable Integer srcPort,
      @Nullable Integer dstPort); @JsonProperty(PROP_IP_PROTOCOL) IpProtocol getIpProtocol(); @JsonProperty(PROP_SRC_IP) Ip getSrcIp(); @JsonProperty(PROP_DST_IP) Ip getDstIp(); @JsonProperty(PROP_SRC_PORT) @Nullable Integer getSrcPort(); @JsonProperty(PROP_DST_PORT) @Nullable Integer getDstPort(); AclLineMatchExpr toAclLineMatchExpr(); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }