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

📄 queue.java

📁 java实现的校园导航系统
💻 JAVA
字号:
package gilyou.liu;

import java.util.ArrayList;

public class Queue implements Cloneable {
    ArrayList<Point> array;
	public Queue() {
		array = new ArrayList<Point>();
	}
	public boolean isEmpty(){
		return array.isEmpty();
	}
	public void enQueue(Point p){
		if(array == null)
			array = new ArrayList<Point>();
		array.add(p);
	}
	public void enQueue(int x,int y){
		if(array == null)
			array = new ArrayList<Point>();
		array.add(new Point(x,y));
	}
	public Point deQueue(){
		if(array.isEmpty())
			return null;
		return array.remove(0);
	}
	public Queue clone(){
		Queue temp = new Queue();
		int indexSize = array.size();
		for(int i = 0; i < indexSize; i++)
			temp.enQueue(array.get(i));
		return temp;
	}
}

⌨️ 快捷键说明

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