public class Inni
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Inni.TimeNode
/////////////////// will be sorted by time...
|
Modifier and Type | Field and Description |
---|---|
(package private) java.util.ArrayList<InniArm> |
arms |
(package private) InniArmElseafter |
elseafterArm |
private static OpMethod |
elseafterTimer
This OpMethod is used by Inni's implementation
to provide a timer for the elseafter arm.
|
(package private) InniArmElse |
elseArm |
Constructor and Description |
---|
Inni(InniArmElseafter elseafterArm,
InniArm firstArm,
InniArm... restArms)
Create a new instance of an Inni.
|
Inni(InniArmElse elseArm,
InniArm firstArm,
InniArm... restArms)
Create a new instance of an Inni.
|
Inni(InniArm firstArm,
InniArm... restArms)
Create a new instance of an Inni.
|
Modifier and Type | Method and Description |
---|---|
private void |
createInni(InniArmElse elseArm,
InniArmElseafter elseafterArm,
InniArm firstArm,
InniArm... restArms)
Common code called from constructors to create a new instance of an Inni.
|
private BaseArmCode.Control |
execElseArmCode(InniArmElseCode code)
Used for
ElseArm and ElseafterArm . |
private java.util.ArrayList<Inni.TimeNode> |
gatherAndSortTimes(java.util.ArrayList<InniArm> arms) |
private void |
oneInniArm(java.util.ArrayList<InniArm> arms,
InniArm a,
int armCount)
Handle one abstract arm for this Inni.
|
BaseArmCode.Control |
service()
Service one invocation as specified by this Inni's arms
by executing the codeBlock in the associated arm.
|
java.util.ArrayList<InniArm> arms
InniArmElse elseArm
InniArmElseafter elseafterArm
private static OpMethod elseafterTimer
public Inni(InniArmElse elseArm, InniArm firstArm, InniArm... restArms)
elseArm
- The elseArm.firstArm
- The first arm.restArms
- Any other arms.public Inni(InniArmElseafter elseafterArm, InniArm firstArm, InniArm... restArms)
elseafterArm
- The elseafterArm.firstArm
- The first arm.restArms
- Any other arms.private void createInni(InniArmElse elseArm, InniArmElseafter elseafterArm, InniArm firstArm, InniArm... restArms)
elseArm
- The elseArm.elseafterArm
- The elseafterArm.firstArm
- The first arm.restArms
- Any other arms.private void oneInniArm(java.util.ArrayList<InniArm> arms, InniArm a, int armCount)
arms
- The list of arms to which to add this arm.a
- The arm.armCount
- The arm's number (0-based).public BaseArmCode.Control service()
private BaseArmCode.Control execElseArmCode(InniArmElseCode code)
ElseArm
and ElseafterArm
.
Execute the arm code, if it's not null
.
Returns the control info from the execution.
N.B., these are executed w/o an Invocation
!code
- The arm code.private java.util.ArrayList<Inni.TimeNode> gatherAndSortTimes(java.util.ArrayList<InniArm> arms)