Definition at line 9 of file Match.java.
Public Member Functions | |
Match (String name, Object val1, Object val2) | |
String | getName () |
String | getValue1 () |
String | getValue2 () |
Static Public Member Functions | |
boolean | compareDouble (Double val1, Double val2) |
< T > boolean | compare (T val1, T val2) |
Static Public Attributes | |
String | GEN = "Generator" |
String | VER = "Version" |
String | PHPDF = "Photon PDF" |
String | PRPDF = "Proton PDF" |
Private Attributes | |
String | name = "" |
Object | value1 = null |
Object | value2 = null |
|
Definition at line 20 of file Match.java. 00020 { 00021 this.name=name; 00022 this.value1=val1; 00023 this.value2=val2; 00024 }
|
|
Compare two object. The reason we use this instead of the compareTo method is compareTo seems to require doubles to be identical to a precision beyond that in the DB. should probably have used floats! Definition at line 58 of file Match.java. 00058 { 00059 00060 if(val1 instanceof Integer){ 00061 return ((Integer)val1).equals((Integer)val2); 00062 } 00063 00064 if(val1 instanceof Double){ 00065 return compareDouble((Double)val1, (Double)val2); 00066 } 00067 00068 return false; 00069 }
|
|
Compare two Doubles with the desired precision. Definition at line 40 of file Match.java. 00040 { 00041 00042 Double diff = val1 - val2; 00043 boolean equal = 00044 Math.abs(diff) <= (Math.abs(val1)+Math.abs(val2)) * 0.00005 || 00045 //0.00000005 || 00046 val1==val2; 00047 return equal; 00048 }
|
|
Definition at line 26 of file Match.java. Referenced by HTMLModelWriter.listNonMatchingParameters(). 00026 {
00027 return name;
00028 }
|
|
Definition at line 29 of file Match.java. Referenced by HTMLModelWriter.listNonMatchingParameters(). 00029 { 00030 return value1.toString(); 00031 }
|
|
Definition at line 32 of file Match.java. Referenced by HTMLModelWriter.listNonMatchingParameters(). 00032 { 00033 return value2.toString(); 00034 }
|
|
Definition at line 11 of file Match.java. |
|
Definition at line 16 of file Match.java. |
|
Definition at line 13 of file Match.java. |
|
Definition at line 14 of file Match.java. |
|
Definition at line 17 of file Match.java. |
|
Definition at line 18 of file Match.java. |
|
Definition at line 12 of file Match.java. |
Generated Wed Jan 17 09:14:27 GMT 2007