示例#1
0
  /**
   * A copy constructor using a ucar.unidata.util.Parameter. Need to do this so ucar.unidata.geoloc
   * package doesnt depend on ucar.nc2 library
   *
   * @param param copy info from here.
   */
  public Attribute(ucar.unidata.util.Parameter param) {
    this.name = param.getName();

    if (param.isString()) {
      setStringValue(param.getStringValue());

    } else {
      double[] values = param.getNumericValues();
      int n = values.length;
      Array vala = Array.factory(DataType.DOUBLE.getPrimitiveClassType(), new int[] {n}, values);
      setValues(vala);
    }
  }