|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcsp.lang.Guard
org.jcsp.lang.InlineAlternative
public class InlineAlternative
This class is experimental (i.e. not properly documented yet).
It is intended to allow Alternative
s to be nested.
Field Summary | |
---|---|
static int |
MODE_ARBITRARY
Flags to control behaviour of this ALT if used as a guard. |
static int |
MODE_FAIR
Flags to control behaviour of this ALT if used as a guard. |
static int |
MODE_PRI
Flags to control behaviour of this ALT if used as a guard. |
Constructor Summary | |
---|---|
InlineAlternative(Guard[] guards)
Creates a new one |
|
InlineAlternative(Guard[] guards,
int mode)
Creates a new one |
Method Summary | |
---|---|
int |
fairSelect()
Creates an Alternative (if needed) and delegates the call to it. |
Guard |
getGuardByIndex(int index)
Returns the guard object at a given index. |
int |
getSelected()
Returns the index of the guard obtained by a call to select() or if this guard became ready within its parent ALT. |
Guard |
getSelectedGuard()
Returns the actual guard object corresponding to the selected guard. |
int |
priSelect()
Creates an Alternative (if needed) and delegates the call to it. |
int |
select()
Creates an Alternative (if needed) and delegates the call to it. |
void |
setPreconditionByIndex(int index,
boolean on)
Alters the precondition on a guard. |
void |
setPreconditions(boolean[] precons)
Establishes a precondition array that will be used by default in calls to select(). |
Methods inherited from class org.jcsp.lang.Guard |
---|
schedule |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_ARBITRARY
public static final int MODE_FAIR
public static final int MODE_PRI
Constructor Detail |
---|
public InlineAlternative(Guard[] guards)
public InlineAlternative(Guard[] guards, int mode)
Method Detail |
---|
public int getSelected()
public void setPreconditions(boolean[] precons)
public void setPreconditionByIndex(int index, boolean on)
public Guard getSelectedGuard()
public Guard getGuardByIndex(int index)
public int select()
public int priSelect()
public int fairSelect()
|
CSP for Java (JCSP) 1.1-rc4 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |