RE: On sorting
<[email protected]> Sat, 25 May 2013 17:59:29 +0200
| Newsgroups | gmane.comp.jakarta.velocity.user |
|---|---|
| Message-ID | <244BFA3AE9F83C4A8261E27189707237010AB332CBDA@ASSCCEVS03.sergas.local> |
> ________________________________________ > From: Sergiu Dumitriu [[email protected]] > Sent: 25 May 2013 17:49 > To: Velocity Users List > Subject: Re: On sorting > > On 05/25/2013 11:39 AM, [email protected] wrote: >> I'm really getting mad! :-) Of course I know that the only reason for this is my lack of skills!!! Catching up... >> >> I do need some kind of security. Please, could you confirm this statement... >> >> Class SortTool can be used to sort any list of objects, but NOT a list of strings. > > Where did you get this from? It is not true, it can sort any list of > comparable things: > > #set ($strings = ['a', 'x', 'b', 'r', 'f']) > $sorttool.sort($strings) -> [a, b, f, r, x] > Great! It is clear my wrong interpretation of this sentence... "SortTool allows a user to sort a collection (or array, iterator, etc) on any arbitary set of properties exposed by the objects contained within the collection." It is taken from the link below. No reference to strings, it speaks only about objects. But it is great to be wrong! And, in this case, how could I get a reverse/desc order? Thanks! >> http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools/generic/SortTool.html >> >> Thanks! Nota: A información contida nesta mensaxe e os seus posibles documentos adxuntos é privada e confidencial e está dirixida únicamente ó seu destinatario/a. Se vostede non é o/a destinatario/a orixinal desta mensaxe, por favor elimínea. A distribución ou copia desta mensaxe non está autorizada. Nota: La información contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y está dirigida únicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elimínelo. La distribución o copia de este mensaje no está autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]