DefaultBand changes for revisions 24972:24973

Replacement of Number type by Double. This change has been forced by a GeoAPI change. Reverting this change causes a compilation failure, which is resolved by restoring the Double values as required by GeoAPI interfaces. So rewriting this contribution produces identical result.

Action: all contributions forced by changes in GeoAPI interfaces (mostly import statements and method signatures) have been rewritten from scratch by creating an empty Java class implementing the interface, clicking on the "Implement all abstract methods" contextual menu in NetBeans, removing the <? extends> part in parameterized type of collections, adding the synchronized keyword (for now) and finally adding the corresponding private fields. This action has been committed in the Apache SIS JDK7 branch at revision 1458238.

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r24972:24973 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/metadata/iso/content/BandImpl.java
Revision 24972Revision 24973
/**
 * Longest wavelength that the sensor is capable of collecting within a designated band.
 */
private Number maxValue;

/**
 * Shortest wavelength that the sensor is capable of collecting within a designated band.
 */
private Number minValue;

/**
 * Units in which sensor wavelengths are expressed. Should be non-null if
/**
 * Longest wavelength that the sensor is capable of collecting within a designated band.
 */
private Double maxValue;

/**
 * Shortest wavelength that the sensor is capable of collecting within a designated band.
 */
private Double minValue;

/**
 * Units in which sensor wavelengths are expressed. Should be non-null if
 * Wavelength at which the response is the highest.
 * {@code null} if unspecified.
 */
private Number peakResponse;

/**
 * Maximum number of significant bits in the uncompressed representation for the value
 * Wavelength at which the response is the highest.
 * {@code null} if unspecified.
 */
private Double peakResponse;

/**
 * Maximum number of significant bits in the uncompressed representation for the value
 * Scale factor which has been applied to the cell value.
 * {@code null} if unspecified.
 */
private Number scaleFactor;

/**
 * The physical value corresponding to a cell value of zero.
 * {@code null} if unspecified.
 */
private Number offset;

/**
 * Constructs an initially empty band.
 * Scale factor which has been applied to the cell value.
 * {@code null} if unspecified.
 */
private Double scaleFactor;

/**
 * The physical value corresponding to a cell value of zero.
 * {@code null} if unspecified.
 */
private Double offset;

/**
 * Constructs an initially empty band.
 * Returns the longest wavelength that the sensor is capable of collecting within
 * a designated band. Returns {@code null} if unspecified.
 */
public Number getMaxValue() {
    return maxValue;
}
 * Returns the longest wavelength that the sensor is capable of collecting within
 * a designated band. Returns {@code null} if unspecified.
 */
public Double getMaxValue() {
    return maxValue;
}
 * Set the longest wavelength that the sensor is capable of collecting within a
 * designated band. Returns {@code null} if unspecified.
 */
public synchronized void setMaxValue(final Number newValue) {
    checkWritePermission();
    maxValue = newValue;
}
 * Set the longest wavelength that the sensor is capable of collecting within a
 * designated band. Returns {@code null} if unspecified.
 */
public synchronized void setMaxValue(final Double newValue) {
    checkWritePermission();
    maxValue = newValue;
}
 * Returns the shortest wavelength that the sensor is capable of collecting
 * within a designated band.
 */
public Number getMinValue() {
    return minValue;
}
 * Returns the shortest wavelength that the sensor is capable of collecting
 * within a designated band.
 */
public Double getMinValue() {
    return minValue;
}
 * Set the shortest wavelength that the sensor is capable of collecting within
 * a designated band.
 */
public synchronized void setMinValue(final Number newValue) {
    checkWritePermission();
    minValue = newValue;
}
 * Set the shortest wavelength that the sensor is capable of collecting within
 * a designated band.
 */
public synchronized void setMinValue(final Double newValue) {
    checkWritePermission();
    minValue = newValue;
}
 * Returns the wavelength at which the response is the highest.
 * Returns {@code null} if unspecified.
 */
public Number getPeakResponse() {
    return peakResponse;
}

/**
 * Set the wavelength at which the response is the highest.
 */
public synchronized void setPeakResponse(final Number newValue) {
    checkWritePermission();
    peakResponse = newValue;
}
 * Returns the wavelength at which the response is the highest.
 * Returns {@code null} if unspecified.
 */
public Double getPeakResponse() {
    return peakResponse;
}

/**
 * Set the wavelength at which the response is the highest.
 */
public synchronized void setPeakResponse(final Double newValue) {
    checkWritePermission();
    peakResponse = newValue;
}
 * Returns the scale factor which has been applied to the cell value.
 * Returns {@code null} if unspecified.
 */
public Number getScaleFactor() {
    return scaleFactor;
}

/**
 * Set the scale factor which has been applied to the cell value.
 */
public synchronized void setScaleFactor(final Number newValue) {
    checkWritePermission();
    scaleFactor = newValue;
}
 * Returns the scale factor which has been applied to the cell value.
 * Returns {@code null} if unspecified.
 */
public Double getScaleFactor() {
    return scaleFactor;
}

/**
 * Set the scale factor which has been applied to the cell value.
 */
public synchronized void setScaleFactor(final Double newValue) {
    checkWritePermission();
    scaleFactor = newValue;
}
     * Returns the physical value corresponding to a cell value of zero.
     * Returns {@code null} if unspecified.
     */
    public Number getOffset() {
        return offset;
    }

    /**
     * Set the physical value corresponding to a cell value of zero.
:     */
    public synchronized void setOffset(final Number newValue) {
        checkWritePermission();
        offset = newValue;
    }
     * Returns the physical value corresponding to a cell value of zero.
     * Returns {@code null} if unspecified.
     */
    public Double getOffset() {
        return offset;
    }

    /**
     * Set the physical value corresponding to a cell value of zero.
:     */
    public synchronized void setOffset(final Double newValue) {
        checkWritePermission();
        offset = newValue;
    }
 */
protected void freeze() {
    super.freeze();
    maxValue     = (Number) unmodifiable(maxValue);
    minValue     = (Number) unmodifiable(minValue);
    units        = (Unit)   unmodifiable(units);
    peakResponse = (Number) unmodifiable(peakResponse);
    scaleFactor  = (Number) unmodifiable(scaleFactor);
    offset       = (Number) unmodifiable(offset);
}

/**
 */
protected void freeze() {
    super.freeze();
    maxValue     = (Double) unmodifiable(maxValue);
    minValue     = (Double) unmodifiable(minValue);
    units        = (Unit)   unmodifiable(units);
    peakResponse = (Double) unmodifiable(peakResponse);
    scaleFactor  = (Double) unmodifiable(scaleFactor);
    offset       = (Double) unmodifiable(offset);
}

/**