@Test public void basics() { new EqualsTester() .addEqualityGroup(portNumber(123), portNumber("123")) .addEqualityGroup(portNumber(321), portNumber(321, "LIM-3-2-1")) .testEquals(); }
private PortNumber(long number) { this.number = number; this.name = UnsignedLongs.toString(number); this.hasName = false; }
PortNumber { private PortNumber(long number) { this.number = number; this.name = UnsignedLongs.toString(number); this.hasName = false; } }
PortNumber { private PortNumber(long number) { this.number = number; this.name = UnsignedLongs.toString(number); this.hasName = false; } private  PortNumber(long number); private  PortNumber(long number, String name); }
PortNumber { private PortNumber(long number) { this.number = number; this.name = UnsignedLongs.toString(number); this.hasName = false; } 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 { private PortNumber(long number) { this.number = number; this.name = UnsignedLongs.toString(number); this.hasName = false; } 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; }