cork.device
Interface DeviceContainer


public interface DeviceContainer

All devices that can contain other devices should implement this interface.

Version:
0.1.1
Author:
Brill Pappin

Method Summary
 void addResouceDevice(Device device)
          Adds another device to this so that device so that this device can use it's resources.
 boolean isResourceDevice(Device device)
          Checks to see if a device has already been bound to this device.
 void removeResouceDevice(Device device)
          Removes another device from this device so that this device can no longer use it's resources.
 

Method Detail

addResouceDevice

public void addResouceDevice(Device device)
Adds another device to this so that device so that this device can use it's resources. e.g. a temperature device might be bound to an ultrasonic ranger to get better readings as ultrasound is dependant on temperature.
Parameters:
device - the device to add to this device.
Since:
0.1.1

removeResouceDevice

public void removeResouceDevice(Device device)
Removes another device from this device so that this device can no longer use it's resources.
Parameters:
device - the device to remove.
Since:
0.1.1

isResourceDevice

public boolean isResourceDevice(Device device)
Checks to see if a device has already been bound to this device.
Parameters:
device - The device to check.
Returns:
boolean true if the specified device has already been bound, false otherwise.
Since:
0.1.1