@Test public void exactlyEquals() { assertTrue(portNumber(0).exactlyEquals(portNumber(0))); assertTrue(portNumber(0, "foo").exactlyEquals(portNumber(0, "foo"))); assertFalse(portNumber(0, "foo").exactlyEquals(portNumber(0, "bar"))); assertFalse(portNumber(0, "foo").exactlyEquals(portNumber(0))); assertFalse(portNumber(0, "foo").exactlyEquals(portNumber(1, "foo"))); assertFalse(portNumber(123).exactlyEquals(portNumber(123, "123"))); }
public boolean exactlyEquals(PortNumber that) { if (this == that) { return true; } return this.equals(that) && this.hasName == that.hasName && Objects.equal(this.name, that.name); }
PortNumber { public boolean exactlyEquals(PortNumber that) { if (this == that) { return true; } return this.equals(that) && this.hasName == that.hasName && Objects.equal(this.name, that.name); } }
PortNumber { public boolean exactlyEquals(PortNumber that) { if (this == that) { return true; } return this.equals(that) && this.hasName == that.hasName && Objects.equal(this.name, that.name); } private  PortNumber(long number); private  PortNumber(long number, String name); }
PortNumber { public boolean exactlyEquals(PortNumber that) { if (this == that) { return true; } return this.equals(that) && this.hasName == that.hasName && Objects.equal(this.name, that.name); } private  PortNumber(long number); private  PortNumber(long number, String name); static PortNumber portNumber(long number); static PortNumber portNumber(String string); static PortNumber portNumber(long number, String name); static PortNumber fromString(String s); boolean isLogical(); long toLong(); String name(); boolean hasName(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean exactlyEquals(PortNumber that); }
PortNumber { public boolean exactlyEquals(PortNumber that) { if (this == that) { return true; } return this.equals(that) && this.hasName == that.hasName && Objects.equal(this.name, that.name); } private  PortNumber(long number); private  PortNumber(long number, String name); static PortNumber portNumber(long number); static PortNumber portNumber(String string); static PortNumber portNumber(long number, String name); static PortNumber fromString(String s); boolean isLogical(); long toLong(); String name(); boolean hasName(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); boolean exactlyEquals(PortNumber that); static final PortNumber P0; static final PortNumber IN_PORT; static final PortNumber TABLE; static final PortNumber NORMAL; static final PortNumber FLOOD; static final PortNumber ALL; static final PortNumber LOCAL; static final PortNumber CONTROLLER; static final PortNumber ANY; }