desmoj
Class InterruptCode

java.lang.Object
desmoj.NamedObject
desmoj.InterruptCode
- public class InterruptCode
- extends NamedObject
Represents a code to be passed to interrupted simprocesses to give
information about the reason for the interruption.
Each new interrupt code instantiated will carry an individual internal
integer codenumber to help identify different interrupt code objects.
These can be checked using the static
equals(InterruptCode a, InterruptCode b) method.
It might come handy to clone an interrupt code object to make it
known at different objects in a model. To produce a clone, create a new
interrupt code using the alternative constructor method giving the
interrupt code to be cloned as a parameter.
That constructor will return a clone of the given interrupt code.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
|
Field Summary |
private int |
irqCode
The internal unique number to identify different interrupt codes. |
private static int |
irqCounter
Static counter to provide each new interrupt code with a unique
internal serial number. |
|
Method Summary |
static boolean |
equals(InterruptCode a,
InterruptCode b)
Returns true if the two given interrupt codes have the
same internal code, false otherwise. |
int |
getCodeNumber()
Returns the internal unique number to identify different interrupt codes. |
irqCounter
private static int irqCounter
- Static counter to provide each new interrupt code with a unique
internal serial number.
irqCode
private int irqCode
- The internal unique number to identify different interrupt codes.
InterruptCode
public InterruptCode(InterruptCode cloneMe)
- Constructs a new interrupt code to be an identical clone of the given
interrupt code object.
The constructor provides the new interrupt code object with same name and
internal codenumber as the interrupt code object given as parameter.
InterruptCode
public InterruptCode(java.lang.String name)
- Produces a new interrupt code with a unique internal serial number and the
given name.
equals
public static boolean equals(InterruptCode a,
InterruptCode b)
- Returns
true if the two given interrupt codes have the
same internal code, false otherwise.
getCodeNumber
public int getCodeNumber()
- Returns the internal unique number to identify different interrupt codes.