Package org.onosproject.net.driver
Class DefaultDriverData
- java.lang.Object
-
- org.onosproject.net.driver.DefaultDriverData
-
- All Implemented Interfaces:
Annotations
,DriverData
,MutableAnnotations
public class DefaultDriverData extends Object implements DriverData
Default implementation of driver data descriptor.
-
-
Constructor Summary
Constructors Constructor Description DefaultDriverData(Driver driver, DeviceId deviceId)
Creates new driver data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MutableAnnotations
clear(String... keys)
Clears the specified keys or the all keys if none were specified.DeviceId
deviceId()
Returns the device identifier.Driver
driver()
Returns the parent device driver.Set<String>
keys()
Returns the set of keys for available annotations.MutableAnnotations
set(String key, String value)
Returns the value of the specified annotation.String
toString()
String
value(String key)
Returns the value of the specified annotation.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.driver.DriverData
behaviour
-
-
-
-
Method Detail
-
driver
public Driver driver()
Description copied from interface:DriverData
Returns the parent device driver.- Specified by:
driver
in interfaceDriverData
- Returns:
- device driver
-
deviceId
public DeviceId deviceId()
Description copied from interface:DriverData
Returns the device identifier.- Specified by:
deviceId
in interfaceDriverData
- Returns:
- device identifier
-
set
public MutableAnnotations set(String key, String value)
Description copied from interface:MutableAnnotations
Returns the value of the specified annotation.- Specified by:
set
in interfaceMutableAnnotations
- Parameters:
key
- annotation keyvalue
- annotation value- Returns:
- self
-
clear
public MutableAnnotations clear(String... keys)
Description copied from interface:MutableAnnotations
Clears the specified keys or the all keys if none were specified.- Specified by:
clear
in interfaceMutableAnnotations
- Parameters:
keys
- keys to be cleared- Returns:
- self
-
keys
public Set<String> keys()
Description copied from interface:Annotations
Returns the set of keys for available annotations.- Specified by:
keys
in interfaceAnnotations
- Returns:
- annotation keys
-
value
public String value(String key)
Description copied from interface:Annotations
Returns the value of the specified annotation.- Specified by:
value
in interfaceAnnotations
- Parameters:
key
- annotation key- Returns:
- annotation value
-
-