| Type Params | Return Type | Name and description |
|---|---|---|
|
public AsyncChannel<?> |
getChannel()The channel the committed offer transferred over: the one received from, or the one sent to. |
|
public int |
getIndex()The zero-based index of the offer that committed. |
<T> |
public T |
getValue()The transferred value: what arrived, for a receive offer; what was sent, for a send offer; the Instant it fired, for a timer offer. |
|
public boolean |
isSend()Whether the committed offer was a send (an output guard). |
|
public boolean |
isTimeout()Whether the committed offer was a timer created by ChannelSelect.after: the select timed out, and getValue() is the instant at which it did. |
|
public String |
toString()Returns a diagnostic representation of this selection result. |
The channel the committed offer transferred over: the one received
from, or the one sent to. Lets a branch be recognised by identity
rather than by position, which suits a select whose offers are
assembled dynamically. A timer offer transfers over no channel of
the caller's, so for a timeout this is null: a select that
carries a timer offer and dispatches on the channel must test
isTimeout() first, and dereference the channel only when
that is false.
null for a timeoutThe zero-based index of the offer that committed.
The transferred value: what arrived, for a receive offer; what was sent, for a send offer; the Instant it fired, for a timer offer.
Whether the committed offer was a send (an output guard).
Whether the committed offer was a timer created by ChannelSelect.after: the select timed out, and getValue() is the instant at which it did.
Returns a diagnostic representation of this selection result.