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

📄 intelement.java

📁 最短路径和哈密顿通路
💻 JAVA
字号:
public class IntElement extends DataElement{

	protected int num;
	public IntElement()
	{
		num=0;
	}
	
	public IntElement(int x)
	{
		num=x;
	}
	
	public void setNum(int x)
	{
		num=x;
	}
	public int getNum()
	{
		return num;
	}
	public boolean equals(DataElement otherElement) {
		// TODO Auto-generated method stub
		IntElement temp=(IntElement)otherElement;
		return (num==temp.num);
	}

	public int compareTo(DataElement otherElement) {
		// TODO Auto-generated method stub
		IntElement temp=(IntElement)otherElement;
		return (num-temp.num);
	}

	public void makeCopy(DataElement otherElement) {
		// TODO Auto-generated method stub
		IntElement temp=(IntElement)otherElement;
		num=temp.num;
	}

	public DataElement getCopy() {
		// TODO Auto-generated method stub
		IntElement temp=new IntElement(num);
		return temp;
	}
	
	public String toString()
	{
		return String.valueOf(num);
	}
	
}

⌨️ 快捷键说明

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