CompareTo Semantics
来源:互联网 发布:淘宝客优惠券采集软件 编辑:程序博客网 时间:2024/05/20 05:07
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 repositoryshoulduse the semantics of java.lang.String.compareTo, as described in CompareToSemantics.
DATE
If V1and V2 are values of type DATE then the repositorymustuse the semantics of java.lang.Calendar.compareTo, as described in CompareToSemantics.
If V1and V2 are values of type DOUBLE then the repositorymustuse the semantics of java.lang.Double.compareTo, as described in CompareToSemantics.
Long
If V1and V2 are values of type LONG then the repositorymustuse the semantics of java.lang.Long.compareTo, as described in CompareToSemantics.
DECIMAL
If V1and V2 are values of type DECIMAL then the repositorymustuse 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.
NAMEIf V1and V2 are values of type NAME andV1 = (N1, L1) and V2= (N2, L2) where N1and N2 are JCR namespaces and L1 andL2are JCR local names then
· V1 is equal to V2if and only if N1 is equaltoN2 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 andV2 are not equal then either V1 is ordered beforeV2 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 andV2 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 andV2 are not equal then either V1 is ordered beforeV2 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 andV2 are bitwise equivalent.
· Ordering is implementation-specific.
- CompareTo Semantics
- compareTo
- compareTo
- compareTo
- HLSL semantics
- Java compareTo
- compareto() & equals()
- compareTo错误
- 110915 compareto
- JAVA compareTo
- compareTo 排序
- compareTo方法
- compareTo方法
- java compareTo()
- Semantics-Aware Malware Detection
- Spring | Semantics based
- 语义网络 (Semantics Web)
- query semantics focus retrieval
- Java集群平台terracotta
- Zend实用指南连载二:性能优化
- TAOVar Out type
- 半角 全角转换
- OpenJWeb网上商城开发文档及源代码
- CompareTo Semantics
- 走进SQL Server 2005 tempdb数据库
- 基础总结篇之三:Activity的task相关 (转载liuhe688)
- ExpandableListView控件
- OpenGL的坐标系
- CentOS设置默认启动命令行(不启动图形界面)
- 【Anychart】自动保存flash图片到指定目录下。
- 表格的渲染模型
- IT人的境界