Class DeviceName
- java.lang.Object
-
- net.haesleinhuepf.clij.clearcl.selector.DeviceName
-
- All Implemented Interfaces:
DeviceSelector
public class DeviceName extends Object implements DeviceSelector
Selects the first device that contains a string- Author:
- royer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinit(ArrayList<ClearCLDevice> pDevices)In some case the whole list of devices is needed before being able to decide on whether a particular device is selected, this method provided this possibility.booleanselected(ClearCLDevice pClearCLDevice)Returns true if the device should be selected, multiple devices can be selected.voidsetNameSubString(String pNameSubString)Adds a name to te list of bad devices.static DeviceSelectorsubString(String pNameSubString)Instanciates a device name selector with the given substring.
-
-
-
Method Detail
-
subString
public static DeviceSelector subString(String pNameSubString)
Instanciates a device name selector with the given substring.- Parameters:
pNameSubString- substring- Returns:
- selector
-
setNameSubString
public void setNameSubString(String pNameSubString)
Adds a name to te list of bad devices.- Parameters:
pNameSubString- substring that should be contained in device name
-
init
public void init(ArrayList<ClearCLDevice> pDevices)
Description copied from interface:DeviceSelectorIn some case the whole list of devices is needed before being able to decide on whether a particular device is selected, this method provided this possibility.- Specified by:
initin interfaceDeviceSelector- Parameters:
pDevices- list of devices to consider
-
selected
public boolean selected(ClearCLDevice pClearCLDevice)
Description copied from interface:DeviceSelectorReturns true if the device should be selected, multiple devices can be selected.- Specified by:
selectedin interfaceDeviceSelector- Parameters:
pClearCLDevice- device- Returns:
- true if selected, false otherwise.
-
-