Replacement of double
by RepresentativeFraction
as a consequence of
changes in GeoAPI interface. Reverting this contribution result in compilation error, which is
solved by re-doing the same type replacement. The hashCode()
method has been removed
(we inherit the generic implementation from the parent class) and the setEquivalentScale(double)
method has also been removed.
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" -r24867:24868 https://svn.osgeo.org/geotools/trunk/modules/library/metadata/src/main/java/org/geotools/metadata/iso/identification/ResolutionImpl.java
Revision 24867 | Revision 24868 |
---|---|
package org.geotools.metadata.iso.identification; // OpenGIS dependencies import org.opengis.metadata.identification.Resolution; // Geotools dependencies |
package org.geotools.metadata.iso.identification;
// OpenGIS dependencies
import org.opengis.metadata.identification.RepresentativeFraction;
import org.opengis.metadata.identification.Resolution;
// Geotools dependencies |
* Only one of {@linkplain #getEquivalentScale equivalent scale} and
* {@linkplain #getDistance ground sample distance} may be provided.
*/
private double equivalentScale;
/**
* Ground sample distance. |
* Only one of {@linkplain #getEquivalentScale equivalent scale} and
* {@linkplain #getDistance ground sample distance} may be provided.
*/
private RepresentativeFraction equivalentScale;
/**
* Ground sample distance. |
* Only one of {@linkplain #getEquivalentScale equivalent scale} and
* {@linkplain #getDistance ground sample distance} may be provided.
*/
public double getEquivalentScale() {
return equivalentScale;
} |
* Only one of {@linkplain #getEquivalentScale equivalent scale} and
* {@linkplain #getDistance ground sample distance} may be provided.
*/
public RepresentativeFraction getEquivalentScale() {
return equivalentScale;
} |
*/
public synchronized void setEquivalentScale(final double newValue) {
checkWritePermission();
equivalentScale = newValue;
}
/** |
*/
public synchronized void setEquivalentScale(final double newValue) {
checkWritePermission();
equivalentScale = RepresentativeFractionImpl.fromDouble( newValue );
}
/** |
*/
public synchronized int hashCode() {
int code = (int)serialVersionUID;
code ^= (int)equivalentScale;
code ^= (int)distance;
return code;
} |
*/
public synchronized int hashCode() {
int code = (int)serialVersionUID;
code ^= (int)equivalentScale.hashCode();
code ^= (int)distance;
return code;
} |