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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 这一刻,感动吧[通俗易懂]

    这一刻,感动吧[通俗易懂]我是哭了好几场啊,难道我神经脆弱?告诉我你哭了几场,我脸都洗不过来啊。不是我不懂爱情,没有爱心,不相信真情,确是这世界忙碌得很,谁与我共行?科学探索:英国一位农夫在自家花园内发现了三只瑟瑟发抖的小狐狸,于是给了它们一个毛绒玩具。没想到小家伙们把它当做了自己的妈妈,不但和它形影不离,吃饭的时候还会留下部分食物,把盆子推到它跟前好友爱的一幕!给饿了的小北极熊食物。在蛮荒之地,气候恶劣。食物不足…

    2022年7月12日
    36
  • idea保存快捷键_idea 快捷键[通俗易懂]

    idea保存快捷键_idea 快捷键[通俗易懂]一、视图切换快捷键ctrl+tab切换的区域列表cmd+e列出最近查看的文件列表shift+cmd+e最近修改文件列表上面两个键在开发过程中非常有用。二、搜索快捷键cmd+f在当前文件中搜索cmd+r在当前文件搜索并替换ctrl+shift+f(r)在项目中进行搜索或替换搜索出来后,要全部替换,按下alt+aalt+F7…

    2022年5月14日
    70
  • 2017 主流手机分辨率与尺寸

    2017 主流手机分辨率与尺寸主流手机分辨率与尺寸1、小米小米1:  480×854   4.0英寸小米2:  720×1280  4.3英寸小米3:  1080×1920 5.0英寸小米4:  1080×1920 5.0英寸小米note:1080×1920 5.7英寸2、华为华为p7: 

    2022年8月13日
    3
  • 配置元素customErrors[通俗易懂]

    配置元素customErrors[通俗易懂] Asp.net配置文件的配置方式,其实在MSDN里面是写得最清楚的了。可惜之前一直未曾了解到MSDN的强大。  先贴个地址:http://msdn.microsoft.com/zh-cn/library/dayb112d(v=vs.80).aspx,然后逐个分析。我希望自己能够从头到尾认真学完这系列东西。为了不至于让自己太早放弃,我决定从自己用过的配置文件学起,然后逐渐接触那些比较生疏,和少…

    2022年7月16日
    13
  • ps快捷键常用表实用表_计算机查找快捷键

    ps快捷键常用表实用表_计算机查找快捷键PS是一款使用最多的图片处理软件,不论是普通玩家还是专业的制图用户都在用。今天来给大家分享ps快捷键常用表,方便大家参考学习使用,在制图的时候更加的便捷。【1】CTRL+SHIFT+单击(选择多个对象)【选择工具】非”自动选择“状态下:1.按CTRL+左键可以选择对象2.按CTRL+SHIFT+左键可以选择多个对象【2】空格+点击(按住状态)(可移动选区)绘制一个选框、矢…

    2022年9月29日
    2
  • wireshark过滤语法总结[通俗易懂]

    wireshark过滤语法总结[通俗易懂]做应用识别这一块经常要对应用产生的数据流量进行分析。抓包采用wireshark,提取特征时,要对session进行过滤,找到关键的stream,这里总结了wireshark过滤的基本语法,供自己以后参考。(脑子记不住东西)wireshark进行过滤时,按照过滤的语法可分为协议过滤和内容过滤。对标准协议,既支持粗粒度的过滤如HTTP,也支持细粒度的、依据协议属性值进行的过滤如tc

    2022年7月13日
    21

发表回复

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

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