[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Tue Jun 26 21:24:14 UTC 2007


gordonp
Tue Jun 26 17:24:14 EDT 2007
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory dev.open-bio.org:/tmp/cvs-serv23839/src/main/org/biomoby/shared

Modified Files:
	PrimitiveTypes.java 
Log Message:
Added Boolean to list of primitive types (was incorrectly missing), also added convenience method to check a data type name against the list
moby-live/Java/src/main/org/biomoby/shared PrimitiveTypes.java,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/PrimitiveTypes.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/PrimitiveTypes.java	2005/07/22 05:30:38	1.1
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/PrimitiveTypes.java	2007/06/26 21:24:14	1.2
@@ -11,8 +11,17 @@
  * <p>email me at edward.kawas at gmail.com
  */
 public class PrimitiveTypes {
-    public static final String[] PRIMS = {"Object", "String", "Integer", "Float", "DateTime"};
+    public static final String[] PRIMS = {"Object", "String", "Integer", "Float", "Boolean", "DateTime"};
     
+    public static boolean isPrimitive(String dataType){
+	for(String primitive: PRIMS){
+	    if(primitive.equals(dataType)){
+		return true;
+	    }
+	}
+	return false;
+    }
+
     public final Object clone() throws java.lang.CloneNotSupportedException {
         return super.clone();
     }




More information about the MOBY-guts mailing list