|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.emn.reactiveinput.Finder
Device finding methods always try to return copies of folder prototypes.
Constructor Summary | |
Finder()
|
Method Summary | |
static void |
deviceProperties(Device d,
java.lang.String[] properties,
java.lang.String[] values)
Internal use. |
static Device |
findDevice(DeviceFolder folder,
DeviceDescriptor descriptor)
Returns the first device matching the given descriptor in the given folder, including all its subfolders. |
static Device[] |
findDeviceMatch(DeviceFolder f,
DeviceDescriptor[] desc)
Find an array of devices matching the given array of descriptors, with distinct declared slots. |
static Device[] |
findDevices(DeviceFolder folder,
DeviceDescriptor descriptor)
Returns all available devices matching the given descriptor in the given folder, including all its subfolders. |
static In |
findIn(Device d,
InDescriptor desc)
Find in the given device an input slot matching the given descriptor. |
static In[] |
findInMatch(Device d,
InDescriptor[] desc)
Find in the given device an array of distinct input slots matching the given array of descriptors. |
static In[] |
findIns(Device d,
InDescriptor desc)
Find in the given device all input slots matching the given descriptor. |
static Out |
findOut(Device d,
OutDescriptor desc)
Find in the given device an output slot matching the given descriptor. |
static Out[] |
findOutMatch(Device d,
OutDescriptor[] desc)
Find in the given device an array of distinct output slots matching the given array of descriptors. |
static Out[] |
findOuts(Device d,
OutDescriptor desc)
Find in the given device all output slots matching the given descriptor. |
static boolean |
isComplete(java.lang.Object[] match)
Returned true if a match is complete (i.e. contains no null). |
static java.lang.String |
retreiveAlias(Device device)
|
static java.lang.String |
retreiveAlias(Slot slot)
|
static Device |
retreiveDevice(java.lang.String alias)
Retrieves the device that has been assigned the given alias since the last call to findMatch(DeviceFolder, DeviceDescriptor[]). |
static java.lang.String |
retreiveFullAlias(Slot slot)
|
static Slot |
retreiveSlot(Device d,
java.lang.String alias)
Retrieves the device slot that has been assigned the given alias since the last call to find(DeviceFolder, DeviceDescriptor), findAll(DeviceFolder, DeviceDescriptor), or findMatch(DeviceFolder, DeviceDescriptor[]). |
static Slot |
retreiveSlot(java.lang.String fullAlias)
Retrieves the slot that has been assigned the given alias since the last call to findMatch(DeviceFolder, DeviceDescriptor[]). |
static java.util.HashMap |
retreiveSlotAliases(Device d)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Finder()
Method Detail |
public static void deviceProperties(Device d, java.lang.String[] properties, java.lang.String[] values)
This method should not be public. Calling it directly will have no effect.
public static Device findDevice(DeviceFolder folder, DeviceDescriptor descriptor)
If the descriptor contains slot declarations, use retreiveSlot(Device d, String alias) to retreive matching slots by alias.
public static Device[] findDeviceMatch(DeviceFolder f, DeviceDescriptor[] desc)
If the descriptor array contains device declarations, use retreiveDevice(String alias) to retreive matching devices by alias.
If slot declarations were provided, use retreiveSlot(Device d, String alias) or getDeclaredSlot(String fullAlias) to retreive matching slots by alias.
Use isComplete(solution) to test the completeness of the result. PENDING: Use a multiple pass algorithm.
public static Device[] findDevices(DeviceFolder folder, DeviceDescriptor descriptor)
Returns null if none.
If the descriptor contains slot declarations, use retreiveSlot(Device d, String alias) to retreive matching slots by alias.
public static In findIn(Device d, InDescriptor desc)
Returns null if not found.
public static In[] findInMatch(Device d, InDescriptor[] desc)
If an array of n InDescriptors is provided, returns an array of n Ins with the same order. This array may contain nulls if match is incomplete (it means that no better result exists). Use isComplete() method to test the completeness of returned match.
public static In[] findIns(Device d, InDescriptor desc)
Returns null if none.
public static Out findOut(Device d, OutDescriptor desc)
Returns null if not found.
public static Out[] findOutMatch(Device d, OutDescriptor[] desc)
If an array of n OutDescriptors is provided, returns an array of n Outs with the same order. This array may contain nulls if match is incomplete (it means that no better result exists). Use isComplete() method to test the completeness of returned match.
public static Out[] findOuts(Device d, OutDescriptor desc)
Returns null if none.
public static boolean isComplete(java.lang.Object[] match)
Use with findMatch() methods.
public static java.lang.String retreiveAlias(Device device)
public static java.lang.String retreiveAlias(Slot slot)
public static Device retreiveDevice(java.lang.String alias)
public static java.lang.String retreiveFullAlias(Slot slot)
public static Slot retreiveSlot(Device d, java.lang.String alias)
public static Slot retreiveSlot(java.lang.String fullAlias)
The slot alias is given in its full form 'devAlias.slotAlias'.
public static java.util.HashMap retreiveSlotAliases(Device d)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |