ONOS-2580 Renamed class name to TpPort to differenciate from loxy TransportPort type easily
Change-Id: Id3e9ca45245126efc9531bad14bd90093e44ba7a
diff --git a/utils/misc/src/main/java/org/onlab/packet/TransportPort.java b/utils/misc/src/main/java/org/onlab/packet/TpPort.java
similarity index 84%
rename from utils/misc/src/main/java/org/onlab/packet/TransportPort.java
rename to utils/misc/src/main/java/org/onlab/packet/TpPort.java
index 58833c6..9b86a81 100644
--- a/utils/misc/src/main/java/org/onlab/packet/TransportPort.java
+++ b/utils/misc/src/main/java/org/onlab/packet/TpPort.java
@@ -19,7 +19,7 @@
/**
* Representation of a transport layer port.
*/
-public class TransportPort {
+public class TpPort {
private final int port;
@@ -28,27 +28,27 @@
public static final int MIN_PORT = 0;
/**
- * Constructs a new TransportPort.
+ * Constructs a new TpPort.
*
* @param value the transport layer port
*/
- protected TransportPort(int value) {
+ protected TpPort(int value) {
this.port = value;
}
/**
- * Converts an integer into a TransportPort.
+ * Converts an integer into a TpPort.
*
* @param value an integer representing the transport layer port
- * @return a TransportPort
+ * @return a TpPort
* @throws IllegalArgumentException if the value is invalid
*/
- public static TransportPort transportPort(int value) {
+ public static TpPort tpPort(int value) {
if (value < MIN_PORT || value > MAX_PORT) {
throw new IllegalArgumentException(
"Transport layer port value " + value + "is not in the interval [0, 0xFFFF]");
}
- return new TransportPort(value);
+ return new TpPort(value);
}
/**
@@ -71,9 +71,9 @@
return true;
}
- if (obj instanceof TransportPort) {
+ if (obj instanceof TpPort) {
- TransportPort other = (TransportPort) obj;
+ TpPort other = (TpPort) obj;
if (this.port == other.port) {
return true;