binnode.java

来自「基于图形的二叉树工作演示程序」· Java 代码 · 共 22 行

JAVA
22
字号
// Source code example for "A Practical Introduction
// to Data Structures and Algorithm Analysis"
// by Clifford A. Shaffer, Prentice Hall, 1998.
// Copyright 1998 by Clifford A. Shaffer

package myBag;
public interface BinNode { // ADT for binary tree nodes
  // Return and set the element value
  public Object element();
  public Object setElement(Object v);

  // Return and set the left child
  public BinNode left();
  public BinNode setLeft(BinNode p);

  // Return and set the right child
  public BinNode right();
  public BinNode setRight(BinNode p);

  // Return true if this is a leaf node
  public boolean isLeaf();
} // interface BinNode

⌨️ 快捷键说明

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