edu.ucdavis.rj.Ops
Class Inni

java.lang.Object
  extended by edu.ucdavis.rj.Ops.Inni

public class Inni
extends java.lang.Object

An Inni services on invocation from a specified group of InniOps. It consists of one or more possibly quantified arms; each arm specifies an operation or quantified group of operations and corresponding code to service the invocation. An Inni also allows an elseArm, which is executed if no invocation is selected for servicing.


Constructor Summary
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.
 
Method Summary
 BaseArmCode.Control service()
          Service one invocation as specified by this Inni's arms by executing the codeBlock in the associated arm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inni

public Inni(InniArmElse elseArm,
            InniArm firstArm,
            InniArm... restArms)
Create a new instance of an Inni. This is the general case (with an elseArm).

Parameters:
elseArm - The elseArm.
firstArm - The first arm.
restArms - Any other arms.

Inni

public Inni(InniArmElseafter elseafterArm,
            InniArm firstArm,
            InniArm... restArms)
Create a new instance of an Inni. This is the general case (with an elseafterArm).

Parameters:
elseafterArm - The elseafterArm.
firstArm - The first arm.
restArms - Any other arms.

Inni

public Inni(InniArm firstArm,
            InniArm... restArms)
Create a new instance of an Inni. This is the common case (without an elseArm or elseafterArm).

Parameters:
firstArm - The first arm.
restArms - Any other arms.
Method Detail

service

public BaseArmCode.Control service()
Service one invocation as specified by this Inni's arms by executing the codeBlock in the associated arm. If no invocation selected, delay the executing process until such an invocation arrives, unless this Inni has an elseArm, in which case execute the codeBlock in the elseArm.

Returns:
Value set within codeBlock indicating control flow to take.