cdm/src/main/java/ucar/ma2/StructureData.java
public Object getScalarObject( StructureMembers.Member m) {
    DataType dataType = m.getDataType();
    //boolean isScalar = m.isScalar();

    if (dataType == DataType.DOUBLE) {
        return getScalarDouble(m);

    } else if (dataType == DataType.FLOAT) {
      return getScalarFloat(m);

    } else if (dataType.getPrimitiveClassType() == byte.class) {
      return getScalarByte(m);

    } else if (dataType.getPrimitiveClassType() == short.class){
      return getScalarShort(m);

    } else if (dataType.getPrimitiveClassType() == int.class) {
      return getScalarInt(m);

    } else if (dataType.getPrimitiveClassType() == long.class) {
      return getScalarLong(m);

    } else if (dataType == DataType.CHAR) {
      return getScalarString( m);

    } else if (dataType == DataType.STRING) {
      return getScalarString( m);

    } else if (dataType == DataType.STRUCTURE) {
      return getScalarStructure( m);

    } else if (dataType == DataType.SEQUENCE) {
      return getArraySequence(m);
    }

    throw new RuntimeException("Dont have implemenation for "+dataType);
  }
public Object getScalarObject( StructureMembers.Member m) {
    DataType dataType = m.getDataType();
    //boolean isScalar = m.isScalar();

    if (dataType == DataType.DOUBLE) {
        return getScalarDouble(m);

    } else if (dataType == DataType.FLOAT) {
      return getScalarFloat(m);

    } else if (dataType.getPrimitiveClassType() == byte.class) {
      return getScalarByte(m);

    } else if (dataType.getPrimitiveClassType() == short.class){
      return getScalarShort(m);

    } else if (dataType.getPrimitiveClassType() == int.class) {
      return getScalarInt(m);

    } else if (dataType.getPrimitiveClassType() == long.class) {
      return getScalarLong(m);

    } else if (dataType == DataType.CHAR) {
      return getScalarString( m);

    } else if (dataType == DataType.STRING) {
      return getScalarString( m);

    } else if (dataType == DataType.STRUCTURE) {
      return getScalarStructure( m);

    } else if (dataType == DataType.SEQUENCE) {
      return getArraySequence(m);
    }

    throw new RuntimeException("Dont have implemenation for "+dataType);
  }
public Object getScalarObject ( StructureMembers . Member m ) { DataType dataType = m . getDataType ( ) ; //boolean isScalar = m.isScalar(); if ( dataType == DataType . DOUBLE ) { return getScalarDouble ( m ) ; } else if ( dataType == DataType . FLOAT ) { return getScalarFloat ( m ) ; } else if ( dataType . getPrimitiveClassType ( ) == byte . class ) { return getScalarByte ( m ) ; } else if ( dataType . getPrimitiveClassType ( ) == short . class ) { return getScalarShort ( m ) ; } else if ( dataType . getPrimitiveClassType ( ) == int . class ) { return getScalarInt ( m ) ; } else if ( dataType . getPrimitiveClassType ( ) == long . class ) { return getScalarLong ( m ) ; } else if ( dataType == DataType . CHAR ) { return getScalarString ( m ) ; } else if ( dataType == DataType . STRING ) { return getScalarString ( m ) ; } else if ( dataType == DataType . STRUCTURE ) { return getScalarStructure ( m ) ; } else if ( dataType == DataType . SEQUENCE ) { return getArraySequence ( m ) ; } throw new RuntimeException ( "Dont have implemenation for " + dataType ) ; }
Get member data array of any type as an Object, eg, Float, Double, String etc.
@param m get data from this StructureMembers.Member.
@return value as Float, Double, etc..
Get member data array of any type as an Object eg Float Double String etc .