GData.Comparable

g GData.Comparable GData.Comparable GObject.GInterface GObject.GInterface GObject.GInterface->GData.Comparable

Implementations:

GData.Author, GData.Category, GData.DocumentsProperty, GData.GContactCalendar, GData.GContactExternalID, GData.GContactLanguage, GData.GContactWebsite, GData.GDEmailAddress, GData.GDIMAddress, GData.GDName, GData.GDOrganization, GData.GDPhoneNumber, GData.GDPostalAddress, GData.GDReminder, GData.GDWhen, GData.GDWhere, GData.GDWho, GData.Generator, GData.Link

Methods

compare (other)

Virtual Methods

do_compare_with (other)

Properties

None

Signals

None

Fields

None

Class Details

class GData.Comparable
Bases:

GObject.GInterface

Structure:

GData.ComparableIface

All the fields in the GData.Comparable structure are private and should never be accessed directly.

New in version 0.7.0.

compare(other)
Parameters:

other (GData.Comparable or None) – another GData.Comparable of the same type, or None

Returns:

True on success, False otherwise

Return type:

int

Compares the two objects, returning -1 if self is “less than” other by some metric, 0 if they’re equal, or 1 if self is “greater than” other.

None values are handled gracefully, with 0 returned if both self and other are None,

-1 if self is None and 1 if other is None. The other object must be of the same type as self, or of a type derived from self's type.

New in version 0.7.0.

do_compare_with(other) virtual
Parameters:

other (GData.Comparable) –

Return type:

int