/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Short shortField = (Short)this.getData(); // Get the physical data if (shortField == null) return 0; return (double)shortField.shortValue(); } /*
/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Short shortField = (Short)this.getData(); // Get the physical data if (shortField == null) return 0; return (double)shortField.shortValue(); } /*
/** * Get the Value of this field as a double. * @return The value of this field. */ public double getValue() { // Get this field's value Short shortField = (Short)this.getData(); // Get the physical data if (shortField == null) return 0; return (double)shortField.shortValue(); } /*
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @param bFixedLength If false (default) be sure to get the length from the stream. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Short shData = (Short)this.getData(); short sData; if (shData == null) sData = NAN; else sData = shData.shortValue(); daOut.writeShort(sData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @param bFixedLength If false (default) be sure to get the length from the stream. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Short shData = (Short)this.getData(); short sData; if (shData == null) sData = NAN; else sData = shData.shortValue(); daOut.writeShort(sData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Write the physical data in this field to a stream file. * @param daOut Output stream to add this field to. * @param bFixedLength If false (default) be sure to get the length from the stream. * @return boolean Success? */ public boolean write(DataOutputStream daOut, boolean bFixedLength) { try { Short shData = (Short)this.getData(); short sData; if (shData == null) sData = NAN; else sData = shData.shortValue(); daOut.writeShort(sData); return true; } catch (IOException ex) { ex.printStackTrace(); return false; } } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); short short1 = Short.MIN_VALUE, short2 = Short.MAX_VALUE; Short tempShort = (Short)this.getData(); // Get the physical data if (tempShort != null) short1 = tempShort.shortValue(); tempShort = (Short)field.getData(); // Get the physical data if (tempShort != null) short2 = tempShort.shortValue(); if (short1 == short2) return 0; if (short1 < short2) return -1; else return 1; } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); short short1 = Short.MIN_VALUE, short2 = Short.MAX_VALUE; Short tempShort = (Short)this.getData(); // Get the physical data if (tempShort != null) short1 = tempShort.shortValue(); tempShort = (Short)field.getData(); // Get the physical data if (tempShort != null) short2 = tempShort.shortValue(); if (short1 == short2) return 0; if (short1 < short2) return -1; else return 1; } /**
/** * Compare field to this and return < > or = (-,+,0). * @return The compare value. */ public int compareTo(Field field) { if (field instanceof BaseField) if (!this.isSameType((BaseField)field)) return super.compareTo(field); short short1 = Short.MIN_VALUE, short2 = Short.MAX_VALUE; Short tempShort = (Short)this.getData(); // Get the physical data if (tempShort != null) short1 = tempShort.shortValue(); tempShort = (Short)field.getData(); // Get the physical data if (tempShort != null) short2 = tempShort.shortValue(); if (short1 == short2) return 0; if (short1 < short2) return -1; else return 1; } /**