elogger API
Overview Classes Cluster Class Index          Top Features

string.collation

Class ST_COLLATOR


Direct ancestors

KL_COMPARATOR, KL_IMPORTED_STRING_ROUTINES

Features

Invariants

indexing

description

Objects that collate strings

library

Gobo Eiffel String Library

copyright

Copyright (c) 2004, Colin Adams and others

license

Eiffel Forum License v2 (see forum.txt)

class ST_COLLATOR

inherit

KL_COMPARATOR [STRING]
KL_PART_COMPARATOR

feature -- Access

collation_key (a_string: STRING): ST_COLLATION_KEY

-- Collation key for a_string;
-- Collation keys provide better performance for multiple
-- comparisons involving the same source strings.

require

string_not_void: a_string /= Void

ensure

collation_key_not_void: Result /= Void

feature -- Comparison

less_than (u, v: STRING): BOOLEAN

-- Is u considered less than v?
-- (From KL_PART_COMPARATOR)

require

u_not_void: u /= Void
v_not_void: v /= Void

ensure

asymmetric: Result implies not less_than (v, u)

three_way_comparison (a_string, another_string: STRING): INTEGER

-- Compare a_string with another_string

require

a_string_not_void: a_string /= Void
another_string_not_void: another_string /= Void

ensure

three_way_comparison: Result >= -1 and Result <= 1

feature -- Status report

greater_than (u, v: STRING): BOOLEAN

-- Is u considered greater than v?
-- (From KL_PART_COMPARATOR)

require

u_not_void: u /= Void
v_not_void: v /= Void

ensure

definition: Result = less_than (v, u)

greater_equal (u, v: STRING): BOOLEAN

-- Is u considered greater than or equal to v?
-- (From KL_COMPARATOR)

require

u_not_void: u /= Void
v_not_void: v /= Void

ensure

definition: Result = (greater_than (u, v) or order_equal (u, v))

less_equal (u, v: STRING): BOOLEAN

-- Is u considered less than or equal to v?
-- (From KL_COMPARATOR)

require

u_not_void: u /= Void
v_not_void: v /= Void

ensure

definition: Result = (less_than (u, v) or order_equal (u, v))

order_equal (u, v: STRING): BOOLEAN

-- Are u and v considered equal?
-- (From KL_COMPARATOR)

require

u_not_void: u /= Void
v_not_void: v /= Void

ensure

definition: Result = (not less_than (u, v) and not greater_than (u, v))

invariant

-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

Documentation generated by edoc