protected Object getTypedValue ( int type , byte [ ] value ) { Object result ; switch ( type ) { case 4 : // Date { result = MPPUtility . getTimestamp ( value , 0 ) ; break ; } case 6 : // Duration { TimeUnit units = MPPUtility . getDurationTimeUnits ( MPPUtility . getShort ( value , 4 ) , m_properties . getDefaultDurationUnits ( ) ) ; result = MPPUtility . getAdjustedDuration ( m_properties , MPPUtility . getInt ( value , 0 ) , units ) ; break ; } case 9 : // Cost { result = Double . valueOf ( MPPUtility . getDouble ( value , 0 ) / 100 ) ; break ; } case 15 : // Number { result = Double . valueOf ( MPPUtility . getDouble ( value , 0 ) ) ; break ; } case 36058 : case 21 : // Text { result = MPPUtility . getUnicodeString ( value , 0 ) ; break ; } default : { result = value ; break ; } } return result ; }
Convert raw value as read from the MPP file into a Java type .