public abstract class GuardedSelectRequest extends java.lang.Object
The base implementation of the SelectRequest interface, providing a useful default masking (guarding) functionality. Whenever invoking a select, guards can be specified, reducing the set of all input channels of the Select to consider in the given request.
Modifiers | Name | Description |
---|---|---|
private java.util.List<java.lang.Boolean> |
mask |
Constructor and description |
---|
GuardedSelectRequest
(java.util.List<java.lang.Boolean> mask)
|
Type | Name and description |
---|---|
boolean |
matchesMask(int index) Detects, whether the channel at the given index is guarded or not. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
mask
- The list of boolean flags indicating which position should be matched against. All indexes match against a null maskDetects, whether the channel at the given index is guarded or not.
index
- The index of the input channel to check for guardCopyright © 2008–2014 Václav Pech. All Rights Reserved.