From: <fg...@us...> - 2010-05-30 17:33:37
|
Revision: 2593 http://openutils.svn.sourceforge.net/openutils/?rev=2593&view=rev Author: fgiust Date: 2010-05-30 17:33:31 +0000 (Sun, 30 May 2010) Log Message: ----------- make method private Modified Paths: -------------- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java Modified: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2010-05-30 17:11:37 UTC (rev 2592) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2010-05-30 17:33:31 UTC (rev 2593) @@ -204,10 +204,7 @@ return key1.compareTo(key2) * (ascending ? 1 : -1); } - /** - * {@inheritDoc} - */ - public int compareByValue(K key1, K key2) + private int compareByValue(K key1, K key2) { V value1 = this.map.get(key1); V value2 = this.map.get(key2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-04-10 07:24:25
|
Revision: 3413 http://openutils.svn.sourceforge.net/openutils/?rev=3413&view=rev Author: fgiust Date: 2011-04-10 07:24:18 +0000 (Sun, 10 Apr 2011) Log Message: ----------- TAGCLOUD-12 tags should be sorted case-insensitive Modified Paths: -------------- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java Modified: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:22:49 UTC (rev 3412) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:24:18 UTC (rev 3413) @@ -1,7 +1,9 @@ +// PATCH al modulo openutils-mgnltagcloud per risolvere la http://jira.openmindlab.com/browse/TAGCLOUD-12 + /** * * Tagcloud module for Magnolia CMS (http://www.openmindlab.com/lab/products/mgnltagcloud.html) - * Copyright(C) 2010-2011, Openmind S.r.l. http://www.openmindonline.it + * Copyright(C) 2010-2010, Openmind S.r.l. http://www.openmindonline.it * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,9 +120,22 @@ * @param ascending sort direction * @return sorted tag cloud */ - public static Map<String, Integer> sortbyname(Map<String, Integer> tags, boolean ascending) + public static Map<String, Integer> sortbyname(Map<String, Integer> tags, final boolean ascending) { - return sort(tags, new ValueComparer<String, Integer>(tags, true, ascending)); + return sort(tags, new Comparator<String>() + { + + public int compare(String o1, String o2) + { + int compareResult = o1.compareToIgnoreCase(o2) * (ascending ? 1 : -1); + if (compareResult == 0) + { + return o1.compareTo(o2) * (ascending ? 1 : -1); + } + return compareResult; + } + + }); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-04-10 07:26:22
|
Revision: 3414 http://openutils.svn.sourceforge.net/openutils/?rev=3414&view=rev Author: fgiust Date: 2011-04-10 07:26:16 +0000 (Sun, 10 Apr 2011) Log Message: ----------- fix license header Modified Paths: -------------- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java Modified: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:24:18 UTC (rev 3413) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:26:16 UTC (rev 3414) @@ -1,5 +1,3 @@ -// PATCH al modulo openutils-mgnltagcloud per risolvere la http://jira.openmindlab.com/browse/TAGCLOUD-12 - /** * * Tagcloud module for Magnolia CMS (http://www.openmindlab.com/lab/products/mgnltagcloud.html) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2011-04-10 07:31:54
|
Revision: 3415 http://openutils.svn.sourceforge.net/openutils/?rev=3415&view=rev Author: fgiust Date: 2011-04-10 07:31:47 +0000 (Sun, 10 Apr 2011) Log Message: ----------- (really) fix license header Modified Paths: -------------- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java Modified: trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java =================================================================== --- trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:26:16 UTC (rev 3414) +++ trunk/openutils-mgnltagcloud/src/main/java/net/sourceforge/openutils/mgnltagcloud/el/TagCloudElFunctions.java 2011-04-10 07:31:47 UTC (rev 3415) @@ -1,7 +1,7 @@ /** * * Tagcloud module for Magnolia CMS (http://www.openmindlab.com/lab/products/mgnltagcloud.html) - * Copyright(C) 2010-2010, Openmind S.r.l. http://www.openmindonline.it + * Copyright(C) 2010-2011, Openmind S.r.l. http://www.openmindonline.it * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |