[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

HasSortOrder

mixes in with Object
mixes in with HasLocale

HasSortOrder



Operations

Get list of all operations

CompareTextBySortOrder
InstallInto
IsTextSimilarBySortOrder
MakeComparableBySortOrder


Attributes

Get list of all attributes

Class HasSortOrder defines no new attributes.


Fields

No fields are defined by HasSortOrder or any of its superclasses.


Instance template

Class HasSortOrder cannot be instantiated.


Class definition

Define Class HasSortOrder;
    mixes in with Object, HasLocale;
    
    // routines to compare the raw text of two text objects

    operation IsTextSimilarBySortOrder(a: HasText; b: HasText): Boolean, safe;
        // call to find out whether this sort order considers these two
        // text objects to be similar
        // implementation is based on CompareTextBySortOrder
        // override if you want a different (maybe more efficient) implementation
    operation CompareTextBySortOrder(a: HasText; b: HasText): SignedShort, safe, noMethod;
        // call to compare two text objects in this sort order.
        // Returns 0 if the text objects are identical,
        // negative values if a < b (sorts before),
        // positive values if a > b (sorts after).
        // Absolute value of return value indicates most relevant difference found:
        // 1 if there is a primary difference (such as difference in text length or
        //   between the characters 'A' and 'B')
        // 2 if there is only a secondary difference (such as between 'A' and 'a')
        // 3 or higher absolute values if the difference is even less relevant
    operation MakeComparableBySortOrder(a: HasText): Text, safe, noMethod;
        // returns copy of a with all characters normalized so that
        // IsTextSimilarBySortOrder(sortOrder, a, b) == IsTextIdentical(MakeComparableBySortOrder(sortOrder, a), MakeComparableBySortOrder(sortOrder, b))

    overrides InstallInto;
        // triggers resorting all alphabetical lists in the system
end class;