@Test public void testEquals() { Prefix subnet1 = Prefix.parse("1.1.1.1/30"); Prefix subnet2 = Prefix.parse("2.2.2.2/30"); new EqualsTester() .addEqualityGroup( new ShiftIpAddressIntoSubnet(DEST_NAT, DESTINATION, subnet1), new ShiftIpAddressIntoSubnet(DEST_NAT, DESTINATION, subnet1)) .addEqualityGroup(new ShiftIpAddressIntoSubnet(SOURCE_NAT, DESTINATION, subnet1)) .addEqualityGroup(new ShiftIpAddressIntoSubnet(DEST_NAT, SOURCE, subnet1)) .addEqualityGroup(new ShiftIpAddressIntoSubnet(DEST_NAT, DESTINATION, subnet2)) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShiftIpAddressIntoSubnet)) { return false; } ShiftIpAddressIntoSubnet that = (ShiftIpAddressIntoSubnet) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_subnet, that._subnet); }
ShiftIpAddressIntoSubnet implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShiftIpAddressIntoSubnet)) { return false; } ShiftIpAddressIntoSubnet that = (ShiftIpAddressIntoSubnet) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_subnet, that._subnet); } }
ShiftIpAddressIntoSubnet implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShiftIpAddressIntoSubnet)) { return false; } ShiftIpAddressIntoSubnet that = (ShiftIpAddressIntoSubnet) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_subnet, that._subnet); } ShiftIpAddressIntoSubnet(TransformationType type, IpField ipField, Prefix subnet); }
ShiftIpAddressIntoSubnet implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShiftIpAddressIntoSubnet)) { return false; } ShiftIpAddressIntoSubnet that = (ShiftIpAddressIntoSubnet) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_subnet, that._subnet); } ShiftIpAddressIntoSubnet(TransformationType type, IpField ipField, Prefix subnet); @Override T accept(TransformationStepVisitor<T> visitor); @JsonProperty(PROP_IP_FIELD) IpField getIpField(); @JsonProperty(PROP_SUBNET) Prefix getSubnet(); @JsonProperty(PROP_TRANSFORMATION_TYPE) TransformationType getType(); @Override boolean equals(Object o); @Override int hashCode(); }
ShiftIpAddressIntoSubnet implements TransformationStep, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof ShiftIpAddressIntoSubnet)) { return false; } ShiftIpAddressIntoSubnet that = (ShiftIpAddressIntoSubnet) o; return _type == that._type && _ipField == that._ipField && Objects.equals(_subnet, that._subnet); } ShiftIpAddressIntoSubnet(TransformationType type, IpField ipField, Prefix subnet); @Override T accept(TransformationStepVisitor<T> visitor); @JsonProperty(PROP_IP_FIELD) IpField getIpField(); @JsonProperty(PROP_SUBNET) Prefix getSubnet(); @JsonProperty(PROP_TRANSFORMATION_TYPE) TransformationType getType(); @Override boolean equals(Object o); @Override int hashCode();  }