Class Dpid


  • public final class Dpid
    extends java.lang.Object
    The class representing a network switch DPID. This class is immutable.
    • Constructor Summary

      Constructors 
      Constructor Description
      Dpid()
      Default constructor.
      Dpid​(long value)
      Constructor from a long value.
      Dpid​(java.lang.String value)
      Constructor from a string.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Dpid dpid​(java.net.URI uri)
      Returns DPID created from the given device URI.
      boolean equals​(java.lang.Object other)  
      int hashCode()  
      java.lang.String toString()
      Convert the DPID value to a ':' separated hexadecimal string.
      static java.net.URI uri​(long value)
      Produces device URI from the given DPID long.
      static java.net.URI uri​(Dpid dpid)
      Produces device URI from the given DPID.
      long value()
      Get the value of the DPID.
      • Methods inherited from class java.lang.Object

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

      • Dpid

        public Dpid()
        Default constructor.
      • Dpid

        public Dpid​(long value)
        Constructor from a long value.
        Parameters:
        value - the value to use.
      • Dpid

        public Dpid​(java.lang.String value)
        Constructor from a string.
        Parameters:
        value - the value to use.
    • Method Detail

      • value

        public long value()
        Get the value of the DPID.
        Returns:
        the value of the DPID.
      • toString

        public java.lang.String toString()
        Convert the DPID value to a ':' separated hexadecimal string.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the DPID value as a ':' separated hexadecimal string.
      • equals

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

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

        public static Dpid dpid​(java.net.URI uri)
        Returns DPID created from the given device URI.
        Parameters:
        uri - device URI
        Returns:
        dpid
      • uri

        public static java.net.URI uri​(Dpid dpid)
        Produces device URI from the given DPID.
        Parameters:
        dpid - device dpid
        Returns:
        device URI
      • uri

        public static java.net.URI uri​(long value)
        Produces device URI from the given DPID long.
        Parameters:
        value - device dpid as long
        Returns:
        device URI