Package org.onosproject.net
Class DeviceId
- java.lang.Object
-
- org.onosproject.net.ElementId
-
- org.onosproject.net.DeviceId
-
- All Implemented Interfaces:
NetworkResource
public final class DeviceId extends ElementId
Immutable representation of a device identity.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DeviceId()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeviceId
deviceId(java.lang.String string)
Creates a device id using the supplied URI string.static DeviceId
deviceId(java.net.URI uri)
Creates a device id using the supplied URI.boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
java.net.URI
uri()
Returns the backing URI.
-
-
-
Field Detail
-
NONE
public static final DeviceId NONE
Represents either no device, or an unspecified device.
-
-
Method Detail
-
deviceId
public static DeviceId deviceId(java.net.URI uri)
Creates a device id using the supplied URI.- Parameters:
uri
- device URI- Returns:
- DeviceId
-
deviceId
public static DeviceId deviceId(java.lang.String string)
Creates a device id using the supplied URI string.- Parameters:
string
- device URI string- Returns:
- DeviceId
-
uri
public java.net.URI uri()
Returns the backing URI.- Returns:
- backing URI
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-