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 protectedDeviceId()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DeviceIddeviceId(java.lang.String string)Creates a device id using the supplied URI string.static DeviceIddeviceId(java.net.URI uri)Creates a device id using the supplied URI.booleanequals(java.lang.Object obj)inthashCode()java.lang.StringtoString()java.net.URIuri()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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-