[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Fri Oct 28 07:58:08 UTC 2005
senger
Fri Oct 28 03:58:08 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory pub.open-bio.org:/tmp/cvs-serv12421/src/main/org/biomoby/shared
Modified Files:
MobyDataType.java
Log Message:
moby-live/Java/src/main/org/biomoby/shared MobyDataType.java,1.10,1.11
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/10/25 09:02:08 1.10
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataType.java 2005/10/28 07:58:08 1.11
@@ -8,7 +8,7 @@
package org.biomoby.shared;
import org.tulsoft.shared.UUtils;
-
+import java.util.Comparator;
/**
* A container representing a data type used in the Moby registry (in
@@ -307,4 +307,17 @@
comment = (value == null ? "" : value);
}
+ /**************************************************************************
+ * Create a comparator for case-insensitive sorting of data types
+ * by their authorities.
+ *************************************************************************/
+ public static Comparator getAuthorityComparator() {
+ return new Comparator() {
+ public int compare (Object o1, Object o2) {
+ String a1 = ((MobyDataType)o1).getAuthority();
+ String a2 = ((MobyDataType)o2).getAuthority();
+ return (a1).compareToIgnoreCase ((String)a2);
+ }
+ };
+ }
}
More information about the MOBY-guts
mailing list