Share via


Duration.Compare(Duration) Method

Definition

Partial order relation comparison with this Duration instance.

[Android.Runtime.Register("compare", "(Ljavax/xml/datatype/Duration;)I", "GetCompare_Ljavax_xml_datatype_Duration_Handler")]
public abstract int Compare (Javax.Xml.Datatype.Duration? duration);
[<Android.Runtime.Register("compare", "(Ljavax/xml/datatype/Duration;)I", "GetCompare_Ljavax_xml_datatype_Duration_Handler")>]
abstract member Compare : Javax.Xml.Datatype.Duration -> int

Parameters

duration
Duration

to compare

Returns

the relationship between thisDurationand duration parameter as DatatypeConstants#LESSER, DatatypeConstants#EQUAL, DatatypeConstants#GREATER or DatatypeConstants#INDETERMINATE.

Attributes

Exceptions

If the underlying implementation cannot reasonably process the request, e.g. W3C XML Schema allows for arbitrarily large/small/precise values, the request may be beyond the implementations capability.

if duration is null.

Remarks

Partial order relation comparison with this Duration instance.

Comparison result must be in accordance with W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2, Order relation on duration.

Return:

<ul> <li>DatatypeConstants#LESSER if this Duration is shorter than duration parameter</li> <li>DatatypeConstants#EQUAL if this Duration is equal to duration parameter</li> <li>DatatypeConstants#GREATER if this Duration is longer than duration parameter</li> <li>DatatypeConstants#INDETERMINATE if a conclusive partial order relation cannot be determined</li> </ul>

Java documentation for javax.xml.datatype.Duration.compare(javax.xml.datatype.Duration).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also