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

Quick Search    Search Deep

desmoj
Class Resource  view Resource download Resource.java

java.lang.Object
  extended bydesmoj.NamedObject
      extended bydesmoj.ModelComponent
          extended bydesmoj.Resource

public class Resource
extends ModelComponent

Resources are objects needed by SimProcesses to perform certain tasks. Every Resource has its unique ID number, so it can be identified. Each Resource belongs to a certain resource category (resource pool) and has the status ready (can be used) or outOfOrder if it is broken down.

Version:
DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL

Field Summary
private  long idNumber
          The ID number of this Resource object.
private  boolean outOfOrder
          Indicating if this resource is out of order (broken down) and therefore can not be used at the moment.
private static long resourceNumber
          The number identifying a Resource.
private  Res resPool
          The reference to the resource pool this resource belongs to.
 
Fields inherited from class desmoj.ModelComponent
 
Fields inherited from class desmoj.NamedObject
 
Constructor Summary
Resource(Model ownerModel, java.lang.String name, Res resPool, boolean showInTrace)
          Constructs a resource object with the given String as name and the given model as the associated owner of this component.
 
Method Summary
 long getidNumber()
          Returns the ID number of this resource object.
 Res getResPool()
          Returns the resource pool (Res) this resource belongs to.
 boolean isOutOfOrder()
          Is this resource out of order at the moment and therefore can not be used?
 void setOutOfOrder(boolean brokenDown)
          This resource can be set to out of order (true) if it is broken down and can not be used at the moment.
 
Methods inherited from class desmoj.ModelComponent
current, currentEntity, currentEvent, currentModel, currentSimProcess, currentTime, debugIsOn, debugOff, debugOn, epsilon, getModel, isExperimentCompatible, isModelCompatible, sendDebugNote, sendMessage, sendTraceNote, sendWarning, setOwner, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn
 
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

resPool

private Res resPool
The reference to the resource pool this resource belongs to.


resourceNumber

private static long resourceNumber
The number identifying a Resource. Because it is a class variable each Resource will get its own ID number starting by zero.


idNumber

private long idNumber
The ID number of this Resource object.


outOfOrder

private boolean outOfOrder
Indicating if this resource is out of order (broken down) and therefore can not be used at the moment.

Constructor Detail

Resource

public Resource(Model ownerModel,
                java.lang.String name,
                Res resPool,
                boolean showInTrace)
Constructs a resource object with the given String as name and the given model as the associated owner of this component. Components can only be created after the corresponding model object has been instantiated. The default preset for the showInTrace option is false.

Method Detail

getidNumber

public long getidNumber()
Returns the ID number of this resource object.


getResPool

public Res getResPool()
Returns the resource pool (Res) this resource belongs to.


isOutOfOrder

public boolean isOutOfOrder()
Is this resource out of order at the moment and therefore can not be used?


setOutOfOrder

public void setOutOfOrder(boolean brokenDown)
This resource can be set to out of order (true) if it is broken down and can not be used at the moment.