Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

desmoj
Class InterruptCode  view InterruptCode download InterruptCode.java

java.lang.Object
  extended bydesmoj.NamedObject
      extended bydesmoj.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.
 
Fields inherited from class desmoj.NamedObject
 
Constructor Summary
InterruptCode(InterruptCode cloneMe)
          Constructs a new interrupt code to be an identical clone of the given interrupt code object.
InterruptCode(java.lang.String name)
          Produces a new interrupt code with a unique internal serial number and the given name.
 
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.
 
Methods inherited from class desmoj.NamedObject
getName, getQuotedName, rename, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

Constructor Detail

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.

Method Detail

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.