public double convertScalarDouble ( int recnum , StructureMembers . Member m ) { if ( m . getDataType ( ) == DataType . DOUBLE ) return getScalarDouble ( recnum , m ) ; if ( m . getDataType ( ) == DataType . FLOAT ) return ( double ) getScalarFloat ( recnum , m ) ; Object o = getScalarObject ( recnum , m ) ; if ( o instanceof Number ) return ( ( Number ) o ) . doubleValue ( ) ; throw new ForbiddenConversionException ( "Type is " + m . getDataType ( ) + ", not convertible to double" ) ; }
Get scalar value as a double with conversion as needed . Underlying type must be convertible to double .