⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 event.java

📁 排队论模拟,最近刚刚找到的
💻 JAVA
字号:
/*
**********************************************************************************************************************
	Wal-Mart Checkout Simulation
	By: Dustin Grimmeissen and Richard Anderson

	-> Event Class

	This class is used to store each event that is placed in the priority queue.  The events store the priority of
	each operation, the customer that they point to, and whether or not they are an arrival or departure event.
**********************************************************************************************************************
*/

public class Event
{
	private int EventType;			// 1 for arrival, 2 for departure
	private long EventPriority;
	public Customer EventCustomer;

	// Constructor
	public Event( Customer ACustomer, long Priority, int Type )
	{
		if (Type == 1)
			EventType = Type;
		else
			EventType = 2;
		EventPriority = Priority;
		EventCustomer = ACustomer;
	}

	public long getPriority()
	{
		return EventPriority;
	}

	public int getType()
	{
		return EventType;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -