java 16 binary_src/ch16/BinaryTree.java · 20162324-春旺/第二学期 - Gitee.com
package ch16;
import java.util.Iterator;
/**
* Created by 春旺 on 2017/10/18.
*/
public interface BinaryTree extends Iterable
{
// Returns the element stored in the root of the tree.
public T getRootElement();
// Returns the left subtree of the root.
public BinaryTree getLeft();
// Returns the right subtree of the root.
public BinaryTree getRight();
// Returns true if the binary tree contains an element that
// matches the specified element and false otherwise.
public boolean contains (T target) throws ElementNotFoundException;
// Returns a reference to the element in the tree matching
// the specified target.
public T find (T target) throws ElementNotFoundException;
// Returns true if the binary tree contains no elements, and
// false otherwise.
public boolean isEmpty();
// Returns the number of elements in this binary tree.
public int size();
// Returns the string representation of the binary tree.
public String toString();
// Returns a preorder traversal on the binary tree.
public Iterator preorder();
// Returns an inorder traversal on the binary tree.
public Iterator inorder();
// Returns a postorder traversal on the binary tree.
public Iterator postorder();
// Performs a level-order traversal on the binary tree.
public Iterator levelorder();
}
一键复制
编辑
Web IDE
原始数据
按行查看
历史
java 16 binary_src/ch16/BinaryTree.java · 20162324-春旺/第二学期 - Gitee.com相关推荐
- 哪家中国公司为Java 16贡献最多?Java第一大厂居然不是第一的...
3月16日,Java16正式发布,前几天小编刚给大家介绍过Java16的新特性,还没有了解的小伙伴点这里:Java 16 正式发布!你还学得动吗? 同时很多小伙伴说自己还在用着Java8,这其中原因, ...
- java 16进制 累加,java 16进制求和示例
java 16进制求和,也就是16进制字节求二进制和,自己写的逻辑有点问题,不能满足需求,故从网上搜了下,满足了需求,代码如下public class Jinzhi16Util { public St ...
- java 16进制整数,Java将整数转换为十六进制整数
I'm trying to convert a number from an integer into an another integer which, if printed in hex, wou ...
- java用linkedlist编写学生类_【S2第二学期-使用Java实现面向对象编程】Java平台的集合类(List、ArrayList、LinkedListMap、HashMap...
一.概述 1.Java集合框架中的两大类接口 分别是Collection接口和Map接口.两者属于不同的类,也继承于两个不同的接口类,在存储方式上有着本质的不同. 2.举例说明两者个继承于哪些接口类: ...
- 紧随Java 16,Spring Framework 5.3.5 发布:涵盖JDK 16的支持!
昨天小编刚给大家介绍过最新的Spring Boot 2.4.4.Spring Cloud 2020.0.2 发布内容,还没看过的小伙伴点这里:Spring Boot 2.4.4.Spring Clou ...
- java 16进制与图片互转
十六进制转成图片 /*** 十六进制转成图片* @author Administrator**/public static void saveToImgFile(String src,String o ...
- 2021年4月16日 阿里供应链Java研发实习面试(二面)
title: 2021年4月16日 阿里供应链Java研发实习面试(二面) tags: 面经 2021年4月16日 阿里供应链Java研发实习面试(二面)(70min) 自我介绍 介绍自己的研究生项目 ...
- 2021年3月16日 北京快手Java开发实习面试(海外增长方向)
title: 2021年3月16日 北京快手Java开发实习面试(海外增长方向) tags: 面经 2021年3月16日 北京快手Java开发实习面试(海外增长方向) 自我介绍你能讲一下你的项目吗?你 ...
- Java 16 正式发布!你还学得动吗?
就在刚刚,Java 16正式发布. Java 16 正式发布 主要特性 Vector API(孵化) 提升了Java在CPU向量计算的性能,这是对大规模的张量计算的支持,提升了Java在AI领域的能力 ...
最新文章
- oracle pl sql注意问题,Oracle PL/SQL编写PL/SQL代码的注意事项
- operator conv_transpose1‘s input 1 is not linked
- c语言中error c2109 是什么错,求c语言改错 error C2109: 下标要求数组或指针类型?...
- js实现向上滚动效果
- cad幕墙下料lisp_石材幕墙屋面不锈钢角钢接闪带施工方法
- 运行java是提示 选择未包含 main 类型 如何解决_RuoYi 若依 代码生成器使用教程...
- ZooKeeper 典型应用场景有哪些?
- 加载elementor时出现问题_在使用聚氨酯发泡机时出现问题的解决方法!
- Spring AOP源码分析(四)Spring AOP的JDK动态代理
- CentOS 6.3最小化安装后,有些必备工作才可以正常使用
- jenkins 编译java_Jenkins 通过 maven 构建编译 JAVA 项目环境
- SSH和SSM的区别
- RabbitMQ的ack与nack
- 考计算机证书指南,计算机二级证书:备考和实战指南--教育频道[温州网]
- [图形计算器]Desmos
- Spring Boot 实现定时任务
- ​华为NTP配置命令
- python 关联规则
- 对开发框架的浅显认识
- 为什么专业领域里外行领导能让墙倒屋塌?