bilinkednodeuos.java
来自「国外的数据结构与算法分析用书」· Java 代码 · 共 42 行
JAVA
42 行
/* BilinkedNodeUos.java
* ---------------------------------------------
* Copyright (c) 2001 University of Saskatchewan
* All Rights Reserved
* --------------------------------------------- */
package dslib.list;
/** A node containing an item and references to the next and
previous nodes. It includes routines to set the item or set
either adjacent node. */
public class BilinkedNodeUos extends LinkedNodeUos
{
/** The previous node. */
protected BilinkedNodeUos previousNode;
/** Construct a new node with item x. <br>
Analysis: Time = O(1)
@param x item placed in the node */
public BilinkedNodeUos(Object x)
{
super(x);
}
/** The previous node. <br>
Analysis: Time = O(1) */
public BilinkedNodeUos previousNode()
{
return previousNode;
}
/** Set the reference to the previous node. <br>
Analysis: Time = O(1)
@param x node to be set as the new previous node */
public void setPreviousNode(BilinkedNodeUos x)
{
previousNode = x;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?