AbstractMathTransform changes for revisions 20755:20874

Changes in GeoTools header does not apply to Apache SIS, since we relicense only the part written by SIS contributors. Changes in the code (inner classes made static) have been reverted (back to non-static inner classes).

Command line:

svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r20755:20874 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/transform/AbstractMathTransform.java
Revision 20755Revision 20874
/*
 * Geotools 2 - OpenSource mapping toolkit
 * (C) 2003, 2004 Geotools Project Managment Committee (PMC)
 * (C) 2001, Institut de Recherche pour le Développement
 *
 *    This library is free software; you can redistribute it and/or
/*
 *    GeoTools - OpenSource mapping toolkit
 *    http://geotools.org
 *
 *   (C) 2003-2006, Geotools Project Managment Committee (PMC)
 * (C) 2001, Institut de Recherche pour le Développement
 *
 *    This library is free software; you can redistribute it and/or
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    You should have received a copy of the GNU Lesser General Public
*    License along with this library; if not, write to the Free Software
*    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*
*    This package contains documentation from OpenGIS specifications.
*    OpenGIS consortium's work is fully acknowledged here.
*/
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    Lesser General Public License for more details.
*
*    This package contains documentation from OpenGIS specifications.
*    OpenGIS consortium's work is fully acknowledged here.
*/
 * @version $Id$
 * @author Martin Desruisseaux
 */
protected abstract class Inverse extends AbstractMathTransform implements Serializable {
    /**
     * Serial number for interoperability with different versions. This serial number is
     * especilly important for inner classes, since the default {@code serialVersionUID}
 * @version $Id$
 * @author Martin Desruisseaux
 */
protected static abstract class Inverse extends AbstractMathTransform implements Serializable {
    /**
     * Serial number for interoperability with different versions. This serial number is
     * especilly important for inner classes, since the default {@code serialVersionUID}
 * http://developer.java.sun.com/developer/bugParade/bugs/4211550.html
 */
private static final long serialVersionUID = 3528274816628012283L;

/**
 * Constructs an inverse math transform.
 */
protected Inverse() {
}

/**
  * http://developer.java.sun.com/developer/bugParade/bugs/4211550.html
  */
 private static final long serialVersionUID = 3528274816628012283L;
private AbstractMathTransform original;

 /**
  * Constructs an inverse math transform.
  */
 protected Inverse(AbstractMathTransform original) {
     this.original = original;
 }

 /**
 * points of the enclosing math transform.
 */
public int getSourceDimensions() {
    return AbstractMathTransform.this.getTargetDimensions();
}

/**
 * points of the enclosing math transform.
 */
public int getSourceDimensions() {
    return original.getTargetDimensions();
}

/**
 * points of the enclosing math transform.
 */
public int getTargetDimensions() {
    return AbstractMathTransform.this.getSourceDimensions();
}

/**
 * points of the enclosing math transform.
 */
public int getTargetDimensions() {
    return original.getSourceDimensions();
}

/**
 * the enclosing math transform.
 */
public Matrix derivative(final Point2D point) throws TransformException {
    return invert(AbstractMathTransform.this.derivative(this.transform(point, null)));
}

/**
 * the enclosing math transform.
 */
public Matrix derivative(final Point2D point) throws TransformException {
    return invert(original.derivative(this.transform(point, null)));
}

/**
 * the enclosing math transform.
 */
public Matrix derivative(final DirectPosition point) throws TransformException {
    return invert(AbstractMathTransform.this.derivative(this.transform(point, null)));
}

/**
 * the enclosing math transform.
 */
public Matrix derivative(final DirectPosition point) throws TransformException {
    return invert(original.derivative(this.transform(point, null)));
}

/**
 * of {@code this} is always {@code AbstractMathTransform.this}.
 */
public final MathTransform inverse() {
    return AbstractMathTransform.this;
}

/**
 * of {@code this} is always {@code AbstractMathTransform.this}.
 */
public final MathTransform inverse() {
    return original;
}

/**
 * enclosing math transform.
 */
public boolean isIdentity() {
    return AbstractMathTransform.this.isIdentity();
}

/**
 * enclosing math transform.
 */
public boolean isIdentity() {
    return original.isIdentity();
}

/**
 * Returns a hash code value for this math transform.
 */
public int hashCode() {
    return ~AbstractMathTransform.this.hashCode();
}

/**
 * Returns a hash code value for this math transform.
 */
public int hashCode() {
    return ~original.hashCode();
}

/**
        formatter.append(parameters);
        return "PARAM_MT";
    } else {
        formatter.append((Formattable) AbstractMathTransform.this);
        return "INVERSE_MT";
    }
}
        formatter.append(parameters);
        return "PARAM_MT";
    } else {
        formatter.append((Formattable) original);
        return "INVERSE_MT";
    }
}