| Constructor and Description |
|---|
MappedSUL(SULMapper<? super AI,? extends AO,? extends CI,? super CO> mapper,
SUL<? super CI,? extends CO> sul) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFork()
Returns whether this SUL is capable of
forking. |
MappedSUL<AI,AO,CI,CO> |
fork()
Forks this SUL, if possible.
|
void |
post()
shut down SUL.
|
void |
pre()
setup SUL.
|
AO |
step(AI in)
make one step on the SUL.
|
public void pre()
SULpublic void post()
SULpublic AO step(AI in) throws SULException
SULstep in interface SUL<AI,AO>in - input to the SULSULExceptionpublic boolean canFork()
SULforking.canFork in interface SUL<AI,AO>true if this SUL can be forked, false otherwiseSUL.fork()public MappedSUL<AI,AO,CI,CO> fork()
SULSUL.pre() and
SUL.post().
If SUL.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.
Copyright © 2018. All rights reserved.