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

📄 contextdata.java

📁 用JAVA实现排序等简单算法的演示
💻 JAVA
字号:
package contextsPoolManager;

public class ContextData {
	private String name = null;
	private String type = null;
	private Object value = null;
	
	public ContextData(String name, String type) {
		this.name = name;  this.type = type;
	}
	public ContextData(String name, String type, Object value) {
		this.name = name;  this.type = type;  this.value = value; 
	}
	public String getName() {
		return name;
	}
	public String getType() {
		return type;
	}
	public Object getValue() {
		return value;
	}

	public int hashCode() {
		final int PRIME = 31;
		int result = 1;
		result = PRIME * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}

	/**
	 * 只要 contextInfo 中的 name 相同就认为是相同的上下文信息
	 */
	public boolean equals(Object obj) {
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		final ContextData other = (ContextData) obj;
		if (name == null) {
			if (other.name != null) return false;
		} else if (!name.equals(other.name)) return false;
		return true;
	}
}

⌨️ 快捷键说明

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