node.java

来自「LINKED LIST OF JAVA, use abstrct classes」· Java 代码 · 共 42 行

JAVA
42
字号


public class Node extends ADTNode
{

	public Node()

	{
		this(null, null);
	}

	public Node(Object o, ADTNode n)
	{
			data = o;
			next = n;
	}

	/* Get the element of the node */
	public Object getElement()
	{
		return data;
	}

	/* Get the next node of the node */
	public ADTNode getNext()
	{
		return next;
	}

	/* Set the element of the node */
	public void setElement(Object newElement)
	{
			data = newElement;
	}

	/* Set the next node of the node */
	public void setNextNode(ADTNode nextNode)
	{
			next = nextNode;
	}

}

⌨️ 快捷键说明

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