I
- input symbolsO
- output symbolspublic interface SUL<I,O>
Modifier and Type | Method and Description |
---|---|
default boolean |
canFork()
Returns whether this SUL is capable of
forking . |
default SUL<I,O> |
fork()
Forks this SUL, if possible.
|
void |
post()
shut down SUL.
|
void |
pre()
setup SUL.
|
O |
step(I in)
make one step on the SUL.
|
void pre()
void post()
@Nullable O step(@Nullable I in) throws SULException
in
- input to the SULSULException
default boolean canFork()
forking
.true
if this SUL can be forked, false
otherwisefork()
@Nonnull default SUL<I,O> fork() throws UnsupportedOperationException
pre()
and
post()
.
If canFork()
returns true
, this method must return a non-null
object, which should
behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, a UnsupportedOperationException
must be thrown.
Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.
UnsupportedOperationException
- if this SUL can't be forked.Copyright © 2018. All rights reserved.