blob: 8d96d8b590bcda3e49a2cae48e5e66a6797bb04b [file] [log] [blame]
package org.onlab.onos.net;
import java.net.URI;
/**
* Immutable representation of a device identity.
*/
public final class DeviceId extends ElementId {
// Default constructor for serialization
protected DeviceId() {}
// Public construction is prohibited
private DeviceId(URI uri) {
super(uri);
}
/**
* Creates a device id using the supplied URI.
*
* @param uri device URI
*/
public static DeviceId deviceId(URI uri) {
return new DeviceId(uri);
}
/**
* Creates a device id using the supplied URI string.
*
* @param string device URI string
*/
public static DeviceId deviceId(String string) {
return deviceId(URI.create(string));
}
}