[MOBY-guts] biomoby commit
Paul Gordon
gordonp at pub.open-bio.org
Tue Apr 5 15:13:27 UTC 2005
gordonp
Tue Apr 5 11:13:27 EDT 2005
Update of /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared
In directory pub.open-bio.org:/tmp/cvs-serv24062/org/biomoby/shared
Modified Files:
MobyDataFloat.java
Log Message:
Fixed typos that cause Floast to clone into Ints
moby-live/Java/src/main/org/biomoby/shared MobyDataFloat.java,1.2,1.3
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataFloat.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataFloat.java 2005/02/09 17:20:38 1.2
+++ /home/repository/moby/moby-live/Java/src/main/org/biomoby/shared/MobyDataFloat.java 2005/04/05 15:13:27 1.3
@@ -15,7 +15,7 @@
/**
* Constructor to use if the incoming value is a number object such as
- * Float, Double, Integer, BigDecimal, etc.
+ * Float, Double, iNTeger, BigDecimal, etc.
*/
public MobyDataFloat(String articleName, Number n){
super(articleName);
@@ -54,7 +54,7 @@
}
public Object clone(){
- MobyDataInt copy = new MobyDataInt(getName(), value);
+ MobyDataFloat copy = new MobyDataFloat(getName(), value);
copy.setDataType(getDataType());
copy.setId(getId());
copy.setNamespaces(getNamespaces());
@@ -72,6 +72,16 @@
return ""+value;
}
+ /**
+ * Overrides default compare to provide a numerical comparison for floats and integers
+ */
+ public int compareTo(Object o){
+ BigDecimal otherNumber = null;
+ if(o instanceof MobyDataSimpleInstance){
+
+ }
+ }
+
public String toXML(){
MobyNamespace[] ns = getNamespaces();
if(xmlMode == SERVICE_XML_MODE){
More information about the MOBY-guts
mailing list