double () { if (myValue == null || myHeader == null) { return Double.NaN; } String dataType = myHeader.getType(); if ("o".equals(dataType)) { return Double.NaN; } String minValue = MoreObjects.firstNonNull(myHeader.getMin(), "0"); String maxValue = MoreObjects.firstNonNull(myHeader.getMax(), "0"); double min; double max; if ("c".equals(dataType)) { min = 0; max = 1; } else if ("b".equals(dataType)) { min = minValue.equals("True") ? 1 : 0; max = maxValue.equals("True") ? 1 : 0; } else { min = Double.parseDouble(minValue); max = Double.parseDouble(maxValue); } return (min == max)? 0 : PyNumericViewUtil.getRangedValue(myValue, dataType, min, max, minValue, maxValue); }