@Test public void testEquals() { new EqualsTester().addEqualityGroup(physicalNetwork1, sameAsPhysicalNetwork1) .addEqualityGroup(physicalNetwork2).testEquals(); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PhysicalNetwork) { final PhysicalNetwork that = (PhysicalNetwork) obj; return this.getClass() == that.getClass() && Objects.equals(this.physicalNetwork, that.physicalNetwork); } return false; }
PhysicalNetwork { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PhysicalNetwork) { final PhysicalNetwork that = (PhysicalNetwork) obj; return this.getClass() == that.getClass() && Objects.equals(this.physicalNetwork, that.physicalNetwork); } return false; } }
PhysicalNetwork { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PhysicalNetwork) { final PhysicalNetwork that = (PhysicalNetwork) obj; return this.getClass() == that.getClass() && Objects.equals(this.physicalNetwork, that.physicalNetwork); } return false; } private  PhysicalNetwork(String physicalNetwork); }
PhysicalNetwork { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PhysicalNetwork) { final PhysicalNetwork that = (PhysicalNetwork) obj; return this.getClass() == that.getClass() && Objects.equals(this.physicalNetwork, that.physicalNetwork); } return false; } private  PhysicalNetwork(String physicalNetwork); static PhysicalNetwork physicalNetwork(String physicalNetwork); String physicalNetwork(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
PhysicalNetwork { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof PhysicalNetwork) { final PhysicalNetwork that = (PhysicalNetwork) obj; return this.getClass() == that.getClass() && Objects.equals(this.physicalNetwork, that.physicalNetwork); } return false; } private  PhysicalNetwork(String physicalNetwork); static PhysicalNetwork physicalNetwork(String physicalNetwork); String physicalNetwork(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }