Hyunsun Moon

ONOS-2580 Renamed class name to TpPort to differenciate from loxy TransportPort type easily

Change-Id: Id3e9ca45245126efc9531bad14bd90093e44ba7a
...@@ -19,7 +19,7 @@ package org.onlab.packet; ...@@ -19,7 +19,7 @@ package org.onlab.packet;
19 /** 19 /**
20 * Representation of a transport layer port. 20 * Representation of a transport layer port.
21 */ 21 */
22 -public class TransportPort { 22 +public class TpPort {
23 23
24 private final int port; 24 private final int port;
25 25
...@@ -28,27 +28,27 @@ public class TransportPort { ...@@ -28,27 +28,27 @@ public class TransportPort {
28 public static final int MIN_PORT = 0; 28 public static final int MIN_PORT = 0;
29 29
30 /** 30 /**
31 - * Constructs a new TransportPort. 31 + * Constructs a new TpPort.
32 * 32 *
33 * @param value the transport layer port 33 * @param value the transport layer port
34 */ 34 */
35 - protected TransportPort(int value) { 35 + protected TpPort(int value) {
36 this.port = value; 36 this.port = value;
37 } 37 }
38 38
39 /** 39 /**
40 - * Converts an integer into a TransportPort. 40 + * Converts an integer into a TpPort.
41 * 41 *
42 * @param value an integer representing the transport layer port 42 * @param value an integer representing the transport layer port
43 - * @return a TransportPort 43 + * @return a TpPort
44 * @throws IllegalArgumentException if the value is invalid 44 * @throws IllegalArgumentException if the value is invalid
45 */ 45 */
46 - public static TransportPort transportPort(int value) { 46 + public static TpPort tpPort(int value) {
47 if (value < MIN_PORT || value > MAX_PORT) { 47 if (value < MIN_PORT || value > MAX_PORT) {
48 throw new IllegalArgumentException( 48 throw new IllegalArgumentException(
49 "Transport layer port value " + value + "is not in the interval [0, 0xFFFF]"); 49 "Transport layer port value " + value + "is not in the interval [0, 0xFFFF]");
50 } 50 }
51 - return new TransportPort(value); 51 + return new TpPort(value);
52 } 52 }
53 53
54 /** 54 /**
...@@ -71,9 +71,9 @@ public class TransportPort { ...@@ -71,9 +71,9 @@ public class TransportPort {
71 return true; 71 return true;
72 } 72 }
73 73
74 - if (obj instanceof TransportPort) { 74 + if (obj instanceof TpPort) {
75 75
76 - TransportPort other = (TransportPort) obj; 76 + TpPort other = (TpPort) obj;
77 77
78 if (this.port == other.port) { 78 if (this.port == other.port) {
79 return true; 79 return true;
......