protected double[] readAttributeDouble2(Attribute att) {
    if (att == null) return null;

    double[] val = new double[2];
    if (att.isString()) {
      StringTokenizer stoke = new StringTokenizer(att.getStringValue());
      val[0] = Double.parseDouble(stoke.nextToken());
      val[1] = stoke.hasMoreTokens() ? Double.parseDouble(stoke.nextToken()) : val[0];
    } else {
      val[0] = att.getNumericValue().doubleValue();
      val[1] = (att.getLength() > 1) ? att.getNumericValue(1).doubleValue() : val[0];
    }
    return val;
  }
protected double[] readAttributeDouble2(Attribute att) {
    if (att == null) return null;

    double[] val = new double[2];
    if (att.isString()) {
      StringTokenizer stoke = new StringTokenizer(att.getStringValue());
      val[0] = Double.parseDouble(stoke.nextToken());
      val[1] = stoke.hasMoreTokens() ? Double.parseDouble(stoke.nextToken()) : val[0];
    } else {
      val[0] = att.getNumericValue().doubleValue();
      val[1] = (att.getLength() > 1) ? att.getNumericValue(1).doubleValue() : val[0];
    }
    return val;
  }
protected double [ ] readAttributeDouble2 ( Attribute att ) { if ( att == null ) return null ; double [ ] val = new double [ 2 ] ; if ( att . isString ( ) ) { StringTokenizer stoke = new StringTokenizer ( att . getStringValue ( ) ) ; val [ 0 ] = Double . parseDouble ( stoke . nextToken ( ) ) ; val [ 1 ] = stoke . hasMoreTokens ( ) ? Double . parseDouble ( stoke . nextToken ( ) ) : val [ 0 ] ; } else { val [ 0 ] = att . getNumericValue ( ) . doubleValue ( ) ; val [ 1 ] = ( att . getLength ( ) > 1 ) ? att . getNumericValue ( 1 ) . doubleValue ( ) : val [ 0 ] ; } return val ; }
Read an attribute as double[2]. If only one value, make second same as first.

@param att the attribute. May be numeric or String.
@return attribute value as a double[2]
Read an attribute as double [ 2 ] . If only one value make second same as first .