registry.java

来自「A byte comunication system made in java 」· Java 代码 · 共 32 行

JAVA
32
字号
package Registry;

import java.util.Hashtable;

public class Registry
{
	private Hashtable hTable = new Hashtable();
	private static Registry _instance = null;

	private Registry() { }

	public static Registry instance()
	{
		if (_instance == null)
			_instance = new Registry();
		return _instance;
	}

	public void put(String theKey, Entry theEntry)
	{
		hTable.put(theKey, theEntry);
	}
	public Entry get(String aKey)
	{
		return (Entry)hTable.get(aKey);
	}
}




⌨️ 快捷键说明

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