QObject

QObject can be used as a base class for objects that need to be placed in queues on a regular basis. A QObject can be in one and only one Queue at a time. An arbitrary object can be associated with the QObject. The user is responsible for managing the type of the attached object.

Creates an QObject with the given name and the creation time set to the supplied value

Parameters

aName

The name of the QObject

Inheritors

Constructors

Link copied to clipboard
constructor(aName: String? = null)

Properties

Link copied to clipboard

A reference to an object that can be attached to the QObject when queued

Link copied to clipboard
override val createTime: Double

The time that the QObject was created

Link copied to clipboard

The receiver that last received the qObject

Link copied to clipboard
override val currentTime: Double

The current simulation time. Attached to the queue object for convenience of checking time outside of model element instances.

Link copied to clipboard
override val id: Long

Gets a uniquely assigned identifier for this QObject. This identifier is assigned when the QObject is created. It may vary if the order of creation changes.

Link copied to clipboard
override val isNotQueued: Boolean
Link copied to clipboard
override val isQueued: Boolean

Checks if the QObject is queued

Link copied to clipboard
override val name: String

The name of the QObject

Link copied to clipboard
override var priority: Int

Sets the priority to the supplied value If the QObject is queued, the queue's changePriority() method is called (possibly causing a reordering of the queue) which may cause significant reordering overhead otherwise the priority is directly changed Changing this value only changes how the QObjects are compared and may or may not change how they are ordered in the queue, depending on the queue discipline used

Link copied to clipboard
open override var qObjectType: Int

A generic attribute to indicate a type for the QObject

Link copied to clipboard
var queue: Queue<*>?

The current queue that the QObject is in, null if not in a queue

Link copied to clipboard

This method can be used to get direct access to the State that represents when the object was queued. This allows access to the total time in the queued state as well as other statistical accumulation of state statistics

Link copied to clipboard
open override var sender: QObjectSenderIfc?

Something that knows how to send qObjects to receivers

Link copied to clipboard
override val timeEnteredQueue: Double

The time that the QObject was LAST enqueued

Link copied to clipboard
override val timeExitedQueue: Double

The time that the QObject LAST exited a queue

Link copied to clipboard
override val timeInQueue: Double

The time that the QObject spent in the Queue based on the LAST time dequeued

Link copied to clipboard

can be used to time stamp the qObject

Link copied to clipboard
open override var valueObject: GetValueIfc?

Allows for a generic value to be held by the QObject

Functions

Link copied to clipboard
open operator override fun compareTo(other: ModelElement.QObject): Int

Returns a negative integer, zero, or a positive integer if this object is less than, equal to, or greater than the specified object.

Link copied to clipboard
fun sender(sender: QObjectSenderIfc?)

Facilitates SAM setting with a lambda

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Facilitates SAM setting with a lambda