Permalink
Browse files

Key value comparator useful for Gobo data structures.

  • Loading branch information...
1 parent 9a2da12 commit b5636959bf54aa3d87f74b84b6fdcce78b89a4c5 @berenddeboer committed May 11, 2012
Showing with 32 additions and 0 deletions.
  1. +32 −0 src/epxc/epx_key_value_comparator.e
@@ -0,0 +1,32 @@
+indexing
+
+ description:
+
+ "Use to sort EPX_KEY_VALUE when used in a DS_SORTABLE"
+
+ library: "eposxix library"
+ author: "Berend de Boer <berend@pobox.com>"
+ copyright: "Copyright (c) 2012, Berend de Boer"
+ license: "MIT License (see LICENSE)"
+
+
+class
+
+ EPX_KEY_VALUE_COMPARATOR
+
+
+inherit
+
+ KL_PART_COMPARATOR [EPX_KEY_VALUE]
+
+
+feature -- Status report
+
+ less_than (u, v: EPX_KEY_VALUE): BOOLEAN
+ -- Is `u' considered less than `v'?
+ do
+ Result := u.key < v.key
+ end
+
+
+end

0 comments on commit b563695

Please sign in to comment.