Java 常提到的自然序(Natural Ordering)

Posted Nothing Is Given.

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Java 常提到的自然序(Natural Ordering)相关的知识,希望对你有一定的参考价值。

  Natural Ordering常在容器中被提到,和迭代器一起出现。

  在Comparable接口的API规范中找到了描述。

(https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html

 

  The natural ordering for a class C is said to be consistent with equals if and only if e1.compareTo(e2) == 0 has the same boolean value as e1.equals(e2) for every e1 and e2 of class C.

   Note that null is not an instance of any class, and e.compareTo(null) should throw a NullPointerException even though e.equals(null) returns false.

 

  即对于类C的任意实例对象e1和e2,表达式“e1.compareTo(e2) == 0”与另一个表达式“e1.equals(e2) ”返回相同的布尔值。

以上是关于Java 常提到的自然序(Natural Ordering)的主要内容,如果未能解决你的问题,请参考以下文章

下载Python自然语言处理实战书籍和代码《Natural Language Processing in Action》

python 按照自然数排序遍历文件 python os.listdir sort by natural sorting

IBM 沃森。自然语言。获取:401 无效的凭据,但它们是正确的。来自 java sdk

自然语言处理 - 标记化 1. NLP 零到英雄 Natural Language Processing - Tokenization

论文阅读笔记Beyond Natural Motion: Exploring Discontinuity for Video Frame Interpolation——超越自然运动: 探索视频帧

什么是自然语言处理?自然语言处理可以分为四大类?有哪些具体任务?