nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92f9f91
)
model_utils: add MEntityNameSorter
author
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 18 Jun 2014 18:24:51 +0000
(14:24 -0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Thu, 26 Jun 2014 16:01:58 +0000
(12:01 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
src/model_utils.nit
patch
|
blob
|
history
diff --git
a/src/model_utils.nit
b/src/model_utils.nit
index
be3fd4d
..
f98e90e
100644
(file)
--- a/
src/model_utils.nit
+++ b/
src/model_utils.nit
@@
-462,6
+462,13
@@
end
# Sorters
+# Sort mentities by their name
+class MEntityNameSorter
+ super AbstractSorter[MEntity]
+ redef fun compare(a, b) do return a.name <=> b.name
+ init do end
+end
+
# Sort mmodules by their name
class MModuleNameSorter
super AbstractSorter[MModule]