CompareTo Semantics[通俗易懂]

CompareTo Semantics[通俗易懂]ForthepropertytypesotherthanBOOLEAN,NAME,PATHandBINARY,comparisonrelationsaredefinedintermsoftheresultofthecompareTomethodoninstancesV1andV2oftheJavaclasscorrespondingto

大家好,又见面了,我是你们的朋友全栈君。

For the property types other than BOOLEAN, NAME, PATH and BINARY, comparison relationsare defined in terms of the result of the compareTo method oninstances V1 and V2 of the Java classcorresponding to the JCR property type (see each section below for the relevantclass). For those types:

·        V1 is equal to V2if and only if V1.compareTo(V2) == 0.

·        V1 is ordered before V2if and only if V1.compareTo(V2) < 0.

·        V1 is ordered after V2if and only if V1.compareTo(V2) > 0.

STRING ,URL,REFFERENCE  and    WEAKREFERENCE

If V1and V2 are values of type STRING, URI, REFERENCE or WEAKREFERENCE then the repository shoulduse the semantics of java.lang.String.compareTo, as described in CompareToSemantics.

DATE

If V1and V2 are values of type DATE then the repository mustuse the semantics of java.lang.Calendar.compareTo, as described in  CompareToSemantics.

DOUBLE

If V1and V2 are values of type DOUBLE then the repository mustuse the semantics of java.lang.Double.compareTo, as described in CompareToSemantics.

Long

If V1and V2 are values of type LONG then the repository mustuse the semantics of java.lang.Long.compareTo, as described in  CompareToSemantics.

DECIMAL

If V1and V2 are values of type DECIMAL then the repository mustuse the semantics of java.lang.BigDecimal.compareTo, as described in  CompareToSemantics.

BOOLEAN

If V1and V2 are values of type BOOLEAN then

·        V1 is equal to V2if and only if V1 == V2.

·        V1 is ordered before V2if and only if V1 == false and V2 == true.

·        V1 is ordered after V2if and only if V1 == true and V2 == false.

NAME

If V1and V2 are values of type NAME and V1 = (N1, L1) and V2= (N2, L2) where N1 and N2 are JCR namespaces and L1 and L2are JCR local names then

·        V1 is equal to V2if and only if N1 is equalto N2 and L1 is equal to L2, according to thesemantics of String.compareTo (see §3.2.7Equality of Names).

·        Ordering isimplementation-specific. The only requirement is that a total order on values of type NAME must be defined,meaning that if V1 and V2 are not equal then either V1 is ordered before V2 or V1 is ordered after V2.

PATH

If V1and V2 are values of type PATH then

·        V1 is equal to V2if and only if V1 and V2 are segment-equal (see §3.3.8 Equalityof Paths).

·        Ordering isimplementation-specific. The only requirement is that a total order on values of type PATH must be defined,meaning that if V1 and V2 are not equal then either V1 is ordered before V2 or V1 is ordered after V2.

BINARY

If V1and V2 are values of type BINARY and given,

·        V1 is equal to V2if and only if V1 and V2 are bitwise equivalent.

·        Ordering is implementation-specific.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/159793.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 新手学c还是java_80x86汇编小站,新手学c还是java

    新手学c还是java_80x86汇编小站,新手学c还是java设计汇编语言的教学方案,决定就从8086汇编开始。学汇编,关注对系统底层的理解,指令太多,初学者伤不起。面对一个复杂的系统,教学中常需要设计一个简化的教学模型,抽取出其中的核心,以此得门而入。高龄的8086汇编,于当今的技术而言,是一个理想的教学模型。学生未来的工作可能基于80×86,可以用Linux汇编、ARM汇编,在8086汇编基础上再做拓展即可。学生将来在工作中可能压根就不会用汇编,通过学汇…

    2022年10月13日
    1
  • 合宙Air720U&724U&722U Lua 固件更新说明

    合宙Air720U&724U&722U Lua 固件更新说明Lua固件更新说明如下:首推1.3基线,不支持1.2基线空中升级到1.3基线版本目录名称1.3底层core下载地址1.2底层core下载地址上层软件下载地址1.3底层core固件更新说明1.2底层core固件更新说明上层脚本更新说明空间说明Luat二次开发使用的Flash空间有两部分:脚本区和文件系统区脚本区:通过Luatools烧写的所有文件,都存放在此区域非TTS版本为720KB,TTS版本为426KB;如果烧录时,超过此限制,Luatools会报错不同版本的core可能会有差异,以

    2022年7月20日
    33
  • SQL Server 2008安装图解教程

    SQL Server 2008安装图解教程一、安装SQLServer2008安装SQL2008的过程与SQL2005的程序基本一样,只不过在安装的过程中部分选项有所改变,当然如果只熟悉SQL2000安装的同志来说则是一个革命性的变动。(一)安装前的准备(1)需要.NetFramework3.5,若在Vista或更高的OS上需要3.5SP1的支持(在SQL2008安装的前会自动更新安装)(2)需要Widnows

    2022年6月23日
    27
  • 红帽linux配置yum源文件_linux查看yum源信息

    红帽linux配置yum源文件_linux查看yum源信息Yum(yellowdogupdatermodified):解决安装过程中的依赖性关系。库中记录软件包的依赖性关系,根据需要安装的软件包,自动安装依赖的其它软件包软件仓库来源:本地ISO镜像;RHEL系统需要购买订阅;CentOS系统;Epel配置文件位置:/etc/yum.repos.d/[AppStream]name=AppstreamfromlocalDVDbaseurl=file:///run/media/root/RHEL-8-0-0-BaseOS-x86_6.

    2022年8月12日
    5
  • JDK安装、java环境配置

    JDK安装、java环境配置

    2021年10月23日
    37
  • mysql 镜像版安装步骤

    mysql 镜像版安装步骤mysql 镜像版安装步骤

    2022年4月24日
    81

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号