@Test public void testEquals() { TcpFlags flags1 = TcpFlags.builder().setUrg(true).setRst(true).build(); TcpFlags flags2 = TcpFlags.builder().setUrg(false).setRst(true).build(); new EqualsTester() .addEqualityGroup( TcpFlagsMatchConditions.builder().setTcpFlags(flags1).setUseUrg(true).build(), TcpFlagsMatchConditions.builder().setTcpFlags(flags1).setUseUrg(true).build()) .addEqualityGroup( TcpFlagsMatchConditions.builder().setTcpFlags(flags2).setUseUrg(true).build()) .addEqualityGroup( TcpFlagsMatchConditions.builder().setTcpFlags(flags1).setUseUrg(false).build()) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TcpFlagsMatchConditions)) { return false; } TcpFlagsMatchConditions other = (TcpFlagsMatchConditions) o; return Objects.equals(_tcpFlags, other._tcpFlags) && _useAck == other._useAck && _useCwr == other._useCwr && _useEce == other._useEce && _useFin == other._useFin && _usePsh == other._usePsh && _useRst == other._useRst && _useSyn == other._useSyn && _useUrg == other._useUrg; }
TcpFlagsMatchConditions implements Serializable, Comparable<TcpFlagsMatchConditions> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TcpFlagsMatchConditions)) { return false; } TcpFlagsMatchConditions other = (TcpFlagsMatchConditions) o; return Objects.equals(_tcpFlags, other._tcpFlags) && _useAck == other._useAck && _useCwr == other._useCwr && _useEce == other._useEce && _useFin == other._useFin && _usePsh == other._usePsh && _useRst == other._useRst && _useSyn == other._useSyn && _useUrg == other._useUrg; } }
TcpFlagsMatchConditions implements Serializable, Comparable<TcpFlagsMatchConditions> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TcpFlagsMatchConditions)) { return false; } TcpFlagsMatchConditions other = (TcpFlagsMatchConditions) o; return Objects.equals(_tcpFlags, other._tcpFlags) && _useAck == other._useAck && _useCwr == other._useCwr && _useEce == other._useEce && _useFin == other._useFin && _usePsh == other._usePsh && _useRst == other._useRst && _useSyn == other._useSyn && _useUrg == other._useUrg; } @JsonCreator private  TcpFlagsMatchConditions(
      @JsonProperty(PROP_TCP_FLAGS) TcpFlags tcpFlags,
      @JsonProperty(PROP_USE_ACK) boolean useAck,
      @JsonProperty(PROP_USE_CWR) boolean useCwr,
      @JsonProperty(PROP_USE_ECE) boolean useEce,
      @JsonProperty(PROP_USE_FIN) boolean useFin,
      @JsonProperty(PROP_USE_PSH) boolean usePsh,
      @JsonProperty(PROP_USE_RST) boolean useRst,
      @JsonProperty(PROP_USE_SYN) boolean useSyn,
      @JsonProperty(PROP_USE_URG) boolean useUrg); }
TcpFlagsMatchConditions implements Serializable, Comparable<TcpFlagsMatchConditions> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TcpFlagsMatchConditions)) { return false; } TcpFlagsMatchConditions other = (TcpFlagsMatchConditions) o; return Objects.equals(_tcpFlags, other._tcpFlags) && _useAck == other._useAck && _useCwr == other._useCwr && _useEce == other._useEce && _useFin == other._useFin && _usePsh == other._usePsh && _useRst == other._useRst && _useSyn == other._useSyn && _useUrg == other._useUrg; } @JsonCreator private  TcpFlagsMatchConditions(
      @JsonProperty(PROP_TCP_FLAGS) TcpFlags tcpFlags,
      @JsonProperty(PROP_USE_ACK) boolean useAck,
      @JsonProperty(PROP_USE_CWR) boolean useCwr,
      @JsonProperty(PROP_USE_ECE) boolean useEce,
      @JsonProperty(PROP_USE_FIN) boolean useFin,
      @JsonProperty(PROP_USE_PSH) boolean usePsh,
      @JsonProperty(PROP_USE_RST) boolean useRst,
      @JsonProperty(PROP_USE_SYN) boolean useSyn,
      @JsonProperty(PROP_USE_URG) boolean useUrg); static Builder builder(); boolean anyUsed(); @Override int compareTo(TcpFlagsMatchConditions o); @Override boolean equals(Object o); @JsonProperty(PROP_TCP_FLAGS) @Nonnull TcpFlags getTcpFlags(); @JsonProperty(PROP_USE_ACK) boolean getUseAck(); @JsonProperty(PROP_USE_CWR) boolean getUseCwr(); @JsonProperty(PROP_USE_ECE) boolean getUseEce(); @JsonProperty(PROP_USE_FIN) boolean getUseFin(); @JsonProperty(PROP_USE_PSH) boolean getUsePsh(); @JsonProperty(PROP_USE_RST) boolean getUseRst(); @JsonProperty(PROP_USE_SYN) boolean getUseSyn(); @JsonProperty(PROP_USE_URG) boolean getUseUrg(); @Override int hashCode(); static TcpFlagsMatchConditions matchAllFlags(TcpFlags flags); boolean match(Flow flow); boolean match(Flow6 flow6); @Override String toString(); }
TcpFlagsMatchConditions implements Serializable, Comparable<TcpFlagsMatchConditions> { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof TcpFlagsMatchConditions)) { return false; } TcpFlagsMatchConditions other = (TcpFlagsMatchConditions) o; return Objects.equals(_tcpFlags, other._tcpFlags) && _useAck == other._useAck && _useCwr == other._useCwr && _useEce == other._useEce && _useFin == other._useFin && _usePsh == other._usePsh && _useRst == other._useRst && _useSyn == other._useSyn && _useUrg == other._useUrg; } @JsonCreator private  TcpFlagsMatchConditions(
      @JsonProperty(PROP_TCP_FLAGS) TcpFlags tcpFlags,
      @JsonProperty(PROP_USE_ACK) boolean useAck,
      @JsonProperty(PROP_USE_CWR) boolean useCwr,
      @JsonProperty(PROP_USE_ECE) boolean useEce,
      @JsonProperty(PROP_USE_FIN) boolean useFin,
      @JsonProperty(PROP_USE_PSH) boolean usePsh,
      @JsonProperty(PROP_USE_RST) boolean useRst,
      @JsonProperty(PROP_USE_SYN) boolean useSyn,
      @JsonProperty(PROP_USE_URG) boolean useUrg); static Builder builder(); boolean anyUsed(); @Override int compareTo(TcpFlagsMatchConditions o); @Override boolean equals(Object o); @JsonProperty(PROP_TCP_FLAGS) @Nonnull TcpFlags getTcpFlags(); @JsonProperty(PROP_USE_ACK) boolean getUseAck(); @JsonProperty(PROP_USE_CWR) boolean getUseCwr(); @JsonProperty(PROP_USE_ECE) boolean getUseEce(); @JsonProperty(PROP_USE_FIN) boolean getUseFin(); @JsonProperty(PROP_USE_PSH) boolean getUsePsh(); @JsonProperty(PROP_USE_RST) boolean getUseRst(); @JsonProperty(PROP_USE_SYN) boolean getUseSyn(); @JsonProperty(PROP_USE_URG) boolean getUseUrg(); @Override int hashCode(); static TcpFlagsMatchConditions matchAllFlags(TcpFlags flags); boolean match(Flow flow); boolean match(Flow6 flow6); @Override String toString(); static final TcpFlagsMatchConditions ACK_TCP_FLAG; static final TcpFlagsMatchConditions RST_TCP_FLAG; static final TcpFlagsMatchConditions SYN_ACK_TCP_FLAG; }