@Test public void testEquals() { Device obj = _builder.build(); new EqualsTester() .addEqualityGroup(obj, obj, _builder.build()) .addEqualityGroup(_builder.setBaseMac(null).build()) .addEqualityGroup(_builder.setConfigSyncIp(null).build()) .addEqualityGroup(_builder.setHostname(null).build()) .addEqualityGroup(_builder.setManagementIp(null).build()) .addEqualityGroup(_builder.setName("n2").build()) .addEqualityGroup(_builder.setSelfDevice(null).build()) .addEqualityGroup(_builder.setUnicastAddresses(ImmutableList.of()).build()) .addEqualityGroup(new Object()) .testEquals(); }
@Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Device)) { return false; } Device rhs = (Device) obj; return Objects.equals(_baseMac, rhs._baseMac) && Objects.equals(_configSyncIp, rhs._configSyncIp) && Objects.equals(_hostname, rhs._hostname) && Objects.equals(_managementIp, rhs._managementIp) && _name.equals(rhs._name) && Objects.equals(_selfDevice, rhs._selfDevice) && _unicastAddresses.equals(rhs._unicastAddresses); }
Device implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Device)) { return false; } Device rhs = (Device) obj; return Objects.equals(_baseMac, rhs._baseMac) && Objects.equals(_configSyncIp, rhs._configSyncIp) && Objects.equals(_hostname, rhs._hostname) && Objects.equals(_managementIp, rhs._managementIp) && _name.equals(rhs._name) && Objects.equals(_selfDevice, rhs._selfDevice) && _unicastAddresses.equals(rhs._unicastAddresses); } }
Device implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Device)) { return false; } Device rhs = (Device) obj; return Objects.equals(_baseMac, rhs._baseMac) && Objects.equals(_configSyncIp, rhs._configSyncIp) && Objects.equals(_hostname, rhs._hostname) && Objects.equals(_managementIp, rhs._managementIp) && _name.equals(rhs._name) && Objects.equals(_selfDevice, rhs._selfDevice) && _unicastAddresses.equals(rhs._unicastAddresses); } Device(
      @Nullable MacAddress baseMac,
      @Nullable Ip configSyncIp,
      @Nullable String hostname,
      @Nullable Ip managementIp,
      String name,
      @Nullable Boolean selfDevice,
      List<UnicastAddress> unicastAddresses); }
Device implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Device)) { return false; } Device rhs = (Device) obj; return Objects.equals(_baseMac, rhs._baseMac) && Objects.equals(_configSyncIp, rhs._configSyncIp) && Objects.equals(_hostname, rhs._hostname) && Objects.equals(_managementIp, rhs._managementIp) && _name.equals(rhs._name) && Objects.equals(_selfDevice, rhs._selfDevice) && _unicastAddresses.equals(rhs._unicastAddresses); } Device(
      @Nullable MacAddress baseMac,
      @Nullable Ip configSyncIp,
      @Nullable String hostname,
      @Nullable Ip managementIp,
      String name,
      @Nullable Boolean selfDevice,
      List<UnicastAddress> unicastAddresses); static @Nonnull Builder builder(); @Nullable MacAddress getBaseMac(); @Nullable Ip getConfigSyncIp(); @Nullable String getHostname(); @Nullable Ip getManagementIp(); @Nonnull String getName(); @Nullable Boolean getSelfDevice(); @Nonnull List<UnicastAddress> getUnicastAddresses(); @Override boolean equals(@Nullable Object obj); @Override int hashCode(); }
Device implements Serializable { @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof Device)) { return false; } Device rhs = (Device) obj; return Objects.equals(_baseMac, rhs._baseMac) && Objects.equals(_configSyncIp, rhs._configSyncIp) && Objects.equals(_hostname, rhs._hostname) && Objects.equals(_managementIp, rhs._managementIp) && _name.equals(rhs._name) && Objects.equals(_selfDevice, rhs._selfDevice) && _unicastAddresses.equals(rhs._unicastAddresses); } Device(
      @Nullable MacAddress baseMac,
      @Nullable Ip configSyncIp,
      @Nullable String hostname,
      @Nullable Ip managementIp,
      String name,
      @Nullable Boolean selfDevice,
      List<UnicastAddress> unicastAddresses); static @Nonnull Builder builder(); @Nullable MacAddress getBaseMac(); @Nullable Ip getConfigSyncIp(); @Nullable String getHostname(); @Nullable Ip getManagementIp(); @Nonnull String getName(); @Nullable Boolean getSelfDevice(); @Nonnull List<UnicastAddress> getUnicastAddresses(); @Override boolean equals(@Nullable Object obj); @Override int hashCode();  }