Update of 
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/users
In directory 
james.mmbase.org:/tmp/cvs-serv26632/java/nl/didactor/component/users

Modified Files:
        PeopleComparator.java 
Log Message:
rationalized a bit, though I still doubt whet the this was good for


See also: 
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/java/nl/didactor/component/users


Index: PeopleComparator.java
===================================================================
RCS file: 
/var/cvs/contributions/didactor2/src/core/java/nl/didactor/component/users/PeopleComparator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- PeopleComparator.java       20 Jun 2008 13:03:13 -0000      1.2
+++ PeopleComparator.java       26 Jun 2008 15:30:11 -0000      1.3
@@ -1,6 +1,7 @@
 package nl.didactor.component.users;
 
 import java.util.Comparator;
+import org.mmbase.bridge.Node;
 
 
 /**
@@ -8,17 +9,15 @@
  * @author azemskov
  * @javadoc
  */
-public class PeopleComparator implements Comparator {
+public class PeopleComparator implements Comparator<Node> {
 
-   public int compare(Object ob1, Object ob2)    {
-      String[] arrstrObj1 = (String[]) ob1;
-      String[] arrstrObj2 = (String[]) ob2;
+    public int compare(Node ob1, Node ob2)    {
 
-      int iResult = arrstrObj1[1].compareTo(arrstrObj2[1]);
+        int iResult = 
ob1.getStringValue("firstname").compareTo(ob2.getStringValue("firstname"));
       if (iResult != 0) {
          return iResult;
       } else {
-         return arrstrObj1[2].compareTo(arrstrObj2[2]);
+            return 
ob1.getStringValue("lastname").compareTo(ob2.getStringValue("lastname"));
       }
    }
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to