Class Dpid
- java.lang.Object
-
- org.onosproject.openflow.controller.Dpid
-
public final class Dpid extends java.lang.ObjectThe class representing a network switch DPID. This class is immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Dpiddpid(java.net.URI uri)Returns DPID created from the given device URI.booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()Convert the DPID value to a ':' separated hexadecimal string.static java.net.URIuri(long value)Produces device URI from the given DPID long.static java.net.URIuri(Dpid dpid)Produces device URI from the given DPID.longvalue()Get the value of the DPID.
-
-
-
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:
toStringin classjava.lang.Object- Returns:
- the DPID value as a ':' separated hexadecimal string.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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
-
-