Class TpPort


  • public class TpPort
    extends java.lang.Object
    Representation of a transport layer port.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAX_PORT  
      static int MIN_PORT  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TpPort​(int value)
      Constructs a new TpPort.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      int toInt()
      Returns the integer value for this transport port.
      java.lang.String toString()  
      static TpPort tpPort​(int value)
      Converts an integer into a TpPort.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TpPort

        protected TpPort​(int value)
        Constructs a new TpPort.
        Parameters:
        value - the transport layer port
    • Method Detail

      • tpPort

        public static TpPort tpPort​(int value)
        Converts an integer into a TpPort.
        Parameters:
        value - an integer representing the transport layer port
        Returns:
        a TpPort
        Throws:
        java.lang.IllegalArgumentException - if the value is invalid
      • toInt

        public int toInt()
        Returns the integer value for this transport port.
        Returns:
        an integer value
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object