Class Port

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Port>
    Direct Known Subclasses:
    SctpPort, TcpPort, UdpPort

    public abstract class Port
    extends NamedNumber<java.lang.Short,​Port>
    Transport layer Port
    Since:
    pcap4j 1.7.5
    Author:
    Ferran Altimiras
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Port​(java.lang.Short value, java.lang.String name)  
    • Constructor Detail

      • Port

        public Port​(java.lang.Short value,
                    java.lang.String name)
        Parameters:
        value - value
        name - name
    • Method Detail

      • valueAsInt

        public int valueAsInt()
        Returns:
        the value of this object as an int.
      • valueAsString

        public java.lang.String valueAsString()
        Overrides:
        valueAsString in class NamedNumber<java.lang.Short,​Port>
        Returns:
        a string representation of this value.
      • compareTo

        public int compareTo​(Port o)
        Specified by:
        compareTo in interface java.lang.Comparable<Port>
        Specified by:
        compareTo in class NamedNumber<java.lang.Short,​Port>