@Test public void testEquals() { new EqualsTester() .addEqualityGroup( new Subnet(Prefix.ZERO, "owner", "arn", "id", "vpc", "zone", ImmutableMap.of()), new Subnet(Prefix.ZERO, "owner", "arn", "id", "vpc", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet( Prefix.parse("1.1.1.1/32"), "owner", "arn", "id", "vpc", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet(Prefix.ZERO, "other", "arn", "id", "vpc", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet(Prefix.ZERO, "owner", "other", "id", "vpc", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet(Prefix.ZERO, "owner", "arn", "other", "vpc", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet(Prefix.ZERO, "owner", "arn", "id", "other", "zone", ImmutableMap.of())) .addEqualityGroup( new Subnet(Prefix.ZERO, "owner", "arn", "id", "vpc", "other", ImmutableMap.of())) .addEqualityGroup( new Subnet( Prefix.ZERO, "owner", "arn", "id", "vpc", "zone", ImmutableMap.of("tag", "value"))) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Subnet)) { return false; } Subnet subnet = (Subnet) o; return _lastGeneratedIp == subnet._lastGeneratedIp && Objects.equals(_cidrBlock, subnet._cidrBlock) && Objects.equals(_ownerId, subnet._ownerId) && Objects.equals(_subnetArn, subnet._subnetArn) && Objects.equals(_subnetId, subnet._subnetId) && Objects.equals(_vpcId, subnet._vpcId) && Objects.equals(_availabilityZone, subnet._availabilityZone) && Objects.equals(_tags, subnet._tags) && Objects.equals(_allocatedIps, subnet._allocatedIps); }
Subnet implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Subnet)) { return false; } Subnet subnet = (Subnet) o; return _lastGeneratedIp == subnet._lastGeneratedIp && Objects.equals(_cidrBlock, subnet._cidrBlock) && Objects.equals(_ownerId, subnet._ownerId) && Objects.equals(_subnetArn, subnet._subnetArn) && Objects.equals(_subnetId, subnet._subnetId) && Objects.equals(_vpcId, subnet._vpcId) && Objects.equals(_availabilityZone, subnet._availabilityZone) && Objects.equals(_tags, subnet._tags) && Objects.equals(_allocatedIps, subnet._allocatedIps); } }
Subnet implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Subnet)) { return false; } Subnet subnet = (Subnet) o; return _lastGeneratedIp == subnet._lastGeneratedIp && Objects.equals(_cidrBlock, subnet._cidrBlock) && Objects.equals(_ownerId, subnet._ownerId) && Objects.equals(_subnetArn, subnet._subnetArn) && Objects.equals(_subnetId, subnet._subnetId) && Objects.equals(_vpcId, subnet._vpcId) && Objects.equals(_availabilityZone, subnet._availabilityZone) && Objects.equals(_tags, subnet._tags) && Objects.equals(_allocatedIps, subnet._allocatedIps); } Subnet(
      Prefix cidrBlock,
      String ownerId,
      String subnetArn,
      String subnetId,
      String vpcId,
      String availabilityZone,
      Map<String, String> tags); }
Subnet implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Subnet)) { return false; } Subnet subnet = (Subnet) o; return _lastGeneratedIp == subnet._lastGeneratedIp && Objects.equals(_cidrBlock, subnet._cidrBlock) && Objects.equals(_ownerId, subnet._ownerId) && Objects.equals(_subnetArn, subnet._subnetArn) && Objects.equals(_subnetId, subnet._subnetId) && Objects.equals(_vpcId, subnet._vpcId) && Objects.equals(_availabilityZone, subnet._availabilityZone) && Objects.equals(_tags, subnet._tags) && Objects.equals(_allocatedIps, subnet._allocatedIps); } Subnet(
      Prefix cidrBlock,
      String ownerId,
      String subnetArn,
      String subnetId,
      String vpcId,
      String availabilityZone,
      Map<String, String> tags); @Nonnull Prefix getCidrBlock(); @Nonnull String getOwnerId(); @Nonnull String getSubnetArn(); @Override String getId(); @Nonnull String getVpcId(); @Nonnull String getAvailabilityZone(); Optional<NetworkAcl> getNetworkAcl(Region region); @Override boolean equals(Object o); @Override int hashCode(); static String nodeName(String subnetId); static String instancesInterfaceName(String subnetId); }
Subnet implements AwsVpcEntity, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Subnet)) { return false; } Subnet subnet = (Subnet) o; return _lastGeneratedIp == subnet._lastGeneratedIp && Objects.equals(_cidrBlock, subnet._cidrBlock) && Objects.equals(_ownerId, subnet._ownerId) && Objects.equals(_subnetArn, subnet._subnetArn) && Objects.equals(_subnetId, subnet._subnetId) && Objects.equals(_vpcId, subnet._vpcId) && Objects.equals(_availabilityZone, subnet._availabilityZone) && Objects.equals(_tags, subnet._tags) && Objects.equals(_allocatedIps, subnet._allocatedIps); } Subnet(
      Prefix cidrBlock,
      String ownerId,
      String subnetArn,
      String subnetId,
      String vpcId,
      String availabilityZone,
      Map<String, String> tags); @Nonnull Prefix getCidrBlock(); @Nonnull String getOwnerId(); @Nonnull String getSubnetArn(); @Override String getId(); @Nonnull String getVpcId(); @Nonnull String getAvailabilityZone(); Optional<NetworkAcl> getNetworkAcl(Region region); @Override boolean equals(Object o); @Override int hashCode(); static String nodeName(String subnetId); static String instancesInterfaceName(String subnetId);  }