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

📄 gameobjectqueue.java

📁 j2me游戏引擎 j2me游戏引擎
💻 JAVA
字号:
package cn.org.matrix.gmatrix.gameLab;

import java.util.Enumeration;
import java.util.Hashtable;
/**
 * 游戏管理对象
 * @author cleverpig
 *
 */
public class GameObjectQueue extends Hashtable {
	private String id=null;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public Object find(String gameObjectId){
		if (this.containsKey(gameObjectId)){
			return this.get(gameObjectId);
		}
		else{
			return null;
		}
	}
	
	public Object[] list(){
		Object[] result=new Object[this.size()];
		Enumeration enumer=this.elements();
		int i=0;
		while(enumer.hasMoreElements()){
			result[i++]=enumer.nextElement();
		}
		return result;
	}
}

⌨️ 快捷键说明

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