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 java.lang.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 MutableAnnotationsclear(java.lang.String... keys)Clears the specified keys or the all keys if none were specified.DeviceIddeviceId()Returns the device identifier.Driverdriver()Returns the parent device driver.java.util.Set<java.lang.String>keys()Returns the set of keys for available annotations.MutableAnnotationsset(java.lang.String key, java.lang.String value)Returns the value of the specified annotation.java.lang.StringtoString()java.lang.Stringvalue(java.lang.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:DriverDataReturns the parent device driver.- Specified by:
driverin interfaceDriverData- Returns:
- device driver
-
deviceId
public DeviceId deviceId()
Description copied from interface:DriverDataReturns the device identifier.- Specified by:
deviceIdin interfaceDriverData- Returns:
- device identifier
-
set
public MutableAnnotations set(java.lang.String key, java.lang.String value)
Description copied from interface:MutableAnnotationsReturns the value of the specified annotation.- Specified by:
setin interfaceMutableAnnotations- Parameters:
key- annotation keyvalue- annotation value- Returns:
- self
-
clear
public MutableAnnotations clear(java.lang.String... keys)
Description copied from interface:MutableAnnotationsClears the specified keys or the all keys if none were specified.- Specified by:
clearin interfaceMutableAnnotations- Parameters:
keys- keys to be cleared- Returns:
- self
-
keys
public java.util.Set<java.lang.String> keys()
Description copied from interface:AnnotationsReturns the set of keys for available annotations.- Specified by:
keysin interfaceAnnotations- Returns:
- annotation keys
-
value
public java.lang.String value(java.lang.String key)
Description copied from interface:AnnotationsReturns the value of the specified annotation.- Specified by:
valuein interfaceAnnotations- Parameters:
key- annotation key- Returns:
- annotation value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-