Skip to main content

XmpDate Class

An XMP metadata date value.

Declaration

public class XmpDate extends XmpValue implements IEquatable<XmpDate>, IComparable<XmpDate>

Implements

com.devexpress.system.IEquatable<com.devexpress.docs.pdf.XmpDate>
com.devexpress.system.IComparable<com.devexpress.docs.pdf.XmpDate>

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject
XmpValue
XmpDate

Constructors

XmpDate() Constructor

Initializes a new instance of the XmpDate class.

Declaration

public XmpDate()

XmpDate(Instant value, XmpDatePrecision precision) Constructor

Initializes a new instance of the XmpDate class with specified instant value and precision.

Declaration

public XmpDate(Instant value, XmpDatePrecision precision)

Parameters

Name Type Description
value Instant

The instant value.

precision XmpDatePrecision

The precision of the date value.

XmpDate(Instant value) Constructor

Initializes a new instance of the XmpDate class with the specified instant value.

Declaration

public XmpDate(Instant value)

Parameters

Name Type Description
value Instant

The instant value.

XmpDate(OffsetDateTime value, XmpDatePrecision precision) Constructor

Initializes a new instance of the XmpDate class with specified value and precision.

Declaration

public XmpDate(OffsetDateTime value, XmpDatePrecision precision)

Parameters

Name Type Description
value OffsetDateTime

The date and time value.

precision XmpDatePrecision

The precision of the date value.

XmpDate(OffsetDateTime value) Constructor

Initializes a new instance of the XmpDate class with specified value.

Declaration

public XmpDate(OffsetDateTime value)

Parameters

Name Type Description
value OffsetDateTime

The date and time value.

Methods

compareTo(XmpDate other) Method

Compares the current XMP date with another XMP date.

Declaration

public int compareTo(XmpDate other)

Parameters

Name Type Description
other XmpDate

The XMP date to compare with this object.

Returns

Type Description
int

A value that indicates the relative order of the compared objects.

equals(Object obj) Method

Determines whether the current XMP date is equal to the specified object.

Declaration

public boolean equals(Object obj)

Parameters

Name Type Description
obj Object

The object to compare with this object.

Returns

Type Description
boolean

true if the specified object has the same value; otherwise, false.

equals(XmpDate other) Method

Determines whether the current XMP date is equal to another XMP date.

Declaration

public boolean equals(XmpDate other)

Parameters

Name Type Description
other XmpDate

The XMP date to compare with this object.

Returns

Type Description
boolean

true if the specified XMP date has the same value; otherwise, false.

getDateValue() Method

Gets the date and time value.

Declaration

public OffsetDateTime getDateValue()

Returns

Type Description
OffsetDateTime

The date and time value.

getHasValue() Method

Returns whether the value is successfully parsed.

Declaration

public boolean getHasValue()

Returns

Type Description
boolean

true if the raw XMP value contains a valid date; otherwise, false.

getNow() Method

Returns an XMP date value that represents the current local date and time.

Declaration

public static XmpDate getNow()

Returns

Type Description
XmpDate

The current local date and time.

getPrecision() Method

Returns the precision of the date value.

Declaration

public @Nullable XmpDatePrecision getPrecision()

Returns

Type Description
XmpDatePrecision

The precision of the date value, or null if the value is not specified.

getUtcNow() Method

Returns an XMP date value that represents the current UTC date and time.

Declaration

public static XmpDate getUtcNow()

Returns

Type Description
XmpDate

The current UTC date and time.

hashCode() Method

Returns the hash code for the current XMP date.

Declaration

public int hashCode()

Returns

Type Description
int

The hash code

toString() Method

Returns the raw string representation of the XMP date value.

Declaration

public String toString()

Returns

Type Description
String

The raw string representation of the value.

tryParse(String value, XmpDate[] result, Runnable result_sync) Method

Converts the specified string representation of an XMP date to an XmpDate object.

Declaration

public static boolean tryParse(String value, XmpDate[] result, Runnable result_sync)

Parameters

Name Type Description
value String

The string representation of the date value.

result XmpDate[]

An array that receives the parsed XmpDate object.

result_sync Runnable

The callback invoked after the result is updated.

Returns

Type Description
boolean

true if the string is successfully parsed; otherwise, false.