jazz.core
Class DeviceLibrary

java.lang.Object
  |
  +--jazz.core.DeviceLibrary
All Implemented Interfaces:
java.io.Serializable

public class DeviceLibrary
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.util.Hashtable devices
           
protected  java.util.Hashtable manipulations
           
 
Constructor Summary
DeviceLibrary()
           
 
Method Summary
 void addDevice(Device d)
          Add a device to the library and set the manipulations to that device to none.
 void addManipulation(Device device, DeviceManipulation manip)
           
 void addManipulation(java.lang.String deviceName, DeviceManipulation manip)
          Add a manipulation associated with a specific device
 Device getDevice(java.lang.String name)
          Get a device with a specific name from the library.
 java.util.Enumeration getDeviceNames()
          Return an enumeration of the device names that can be used to loop through all the devices
 DeviceManipulation getManipulation(java.lang.String deviceName, java.lang.String manipName)
          Get a manipulation a specific device and name from the library.
protected  java.util.Hashtable getManipulationHash(java.lang.String deviceName)
          Internal function which gets the hashtable associated with a device
 java.util.Enumeration getManipulationNames(java.lang.String deviceName)
          Return an enumeration of the manipulation names associated with a device that can be used to loop through all the device's manipulations
 boolean hasDevice(Device d)
           
 boolean hasDevice(java.lang.String name)
          Return whether or a device with a given name exists in the library
 boolean hasManipulation(Device device, DeviceManipulation manip)
           
 boolean hasManipulation(java.lang.String deviceName, java.lang.String manipName)
          Return whether or not a given device in a library has a named manipulation
 void removeDevice(java.lang.String name)
          Remove a device with a specific name from the library.
 void removeManipulation(java.lang.String deviceName, java.lang.String manipName)
          Remove a manipulation a specific device and name from the library.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

devices

protected java.util.Hashtable devices

manipulations

protected java.util.Hashtable manipulations
Constructor Detail

DeviceLibrary

public DeviceLibrary()
Method Detail

addDevice

public void addDevice(Device d)
Add a device to the library and set the manipulations to that device to none.

hasDevice

public boolean hasDevice(java.lang.String name)
Return whether or a device with a given name exists in the library

hasDevice

public boolean hasDevice(Device d)

getDevice

public Device getDevice(java.lang.String name)
Get a device with a specific name from the library. Raise an error if it doesn't exist

removeDevice

public void removeDevice(java.lang.String name)
Remove a device with a specific name from the library. Raise an error if it doesn't exist

getDeviceNames

public java.util.Enumeration getDeviceNames()
Return an enumeration of the device names that can be used to loop through all the devices

getManipulationHash

protected java.util.Hashtable getManipulationHash(java.lang.String deviceName)
Internal function which gets the hashtable associated with a device

hasManipulation

public boolean hasManipulation(java.lang.String deviceName,
                               java.lang.String manipName)
Return whether or not a given device in a library has a named manipulation

hasManipulation

public boolean hasManipulation(Device device,
                               DeviceManipulation manip)

addManipulation

public void addManipulation(java.lang.String deviceName,
                            DeviceManipulation manip)
Add a manipulation associated with a specific device

addManipulation

public void addManipulation(Device device,
                            DeviceManipulation manip)

getManipulation

public DeviceManipulation getManipulation(java.lang.String deviceName,
                                          java.lang.String manipName)
Get a manipulation a specific device and name from the library. Raise an error if it doesn't exist

removeManipulation

public void removeManipulation(java.lang.String deviceName,
                               java.lang.String manipName)
Remove a manipulation a specific device and name from the library. Raise an error if it doesn't exist

getManipulationNames

public java.util.Enumeration getManipulationNames(java.lang.String deviceName)
Return an enumeration of the manipulation names associated with a device that can be used to loop through all the device's manipulations