org.apache.sis.referencing.operation.transform

## Class AbstractMathTransform.Inverse

- Object
- - FormattableObject
  - - AbstractMathTransform
    - - AbstractMathTransform.Inverse

- All Implemented Interfaces:
    Serializable, Parameterized, LenientComparable, MathTransform
  Direct Known Subclasses:
    AbstractMathTransform1D.Inverse, AbstractMathTransform2D.Inverse
  Enclosing class:
    AbstractMathTransform

      protected abstract class AbstractMathTransform.Inverse
      extends AbstractMathTransform
      implements Serializable

  Base class for implementations of inverse math transforms. This inner class is the inverse of the enclosing `AbstractMathTransform`.
  Serialization
  Instances of this class are serializable only if the enclosing math transform is also serializable. Serialized math transforms are not guaranteed to be compatible with future SIS versions. Serialization, if allowed, should be used only for short term storage or RMI between applications running the same SIS version.
  Since:
    0.5
  See Also:
    Serialized Form

  Defined in the `sis-referencing` module

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class AbstractMathTransform

      `AbstractMathTransform​.Inverse`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Inverse()` Constructs an inverse math transform.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `computeHashCode()` Computes a hash value for this transform.
    `Matrix` | `derivative(DirectPosition point)` Gets the derivative of this transform at a point.
    `boolean` | `equals(Object object, ComparisonMode mode)` Compares the specified object with this inverse math transform for equality.
    `protected String` | `formatTo(Formatter formatter)` Formats the inner part of a Well Known Text version 1 (WKT 1) element.
    `int` | `getSourceDimensions()` Gets the dimension of input points.
    `int` | `getTargetDimensions()` Gets the dimension of output points.
    `MathTransform` | `inverse()` Returns the inverse of this math transform, which is the enclosing math transform.
    `boolean` | `isIdentity()` Tests whether this transform does not move any points.

    - ### Methods inherited from class AbstractMathTransform

      `equals, getContextualParameters, getParameterDescriptors, getParameterValues, hashCode, transform, transform, transform, transform, transform, transform, tryConcatenate`

    - ### Methods inherited from class FormattableObject

      `print, toString, toString, toWKT`

    - ### Methods inherited from class Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface MathTransform

      `toWKT`

- - ### Constructor Detail

    - #### Inverse

          protected Inverse()

      Constructs an inverse math transform.

  - ### Method Detail

    - #### getSourceDimensions

          public final int getSourceDimensions()

      Gets the dimension of input points. The implementation returns the dimension of output points of the enclosing math transform.
      Specified by:
        `getSourceDimensions` in interface `MathTransform`
      Specified by:
        `getSourceDimensions` in class `AbstractMathTransform`
      Returns:
        the dimension of input points.
      See Also:
        `DefaultOperationMethod​.getSourceDimensions()`

    - #### getTargetDimensions

          public final int getTargetDimensions()

      Gets the dimension of output points. The implementation returns the dimension of input points of the enclosing math transform.
      Specified by:
        `getTargetDimensions` in interface `MathTransform`
      Specified by:
        `getTargetDimensions` in class `AbstractMathTransform`
      Returns:
        the dimension of output points.
      See Also:
        `DefaultOperationMethod​.getTargetDimensions()`

    - #### derivative

          public Matrix derivative(DirectPosition point)
                            throws TransformException

      Gets the derivative of this transform at a point. The default implementation computes the inverse of the matrix returned by the enclosing math transform.
      Specified by:
        `derivative` in interface `MathTransform`
      Overrides:
        `derivative` in class `AbstractMathTransform`
      Parameters:
        `point` - the coordinate point where to evaluate the derivative.
      Returns:
        the derivative at the specified point (never `null`).
      Throws:
        `NullPointerException` - if the derivative depends on coordinate and `point` is `null`.
        `MismatchedDimensionException` - if `point` does not have the expected dimension.
        `TransformException` - if the derivative can not be evaluated at the specified point.

    - #### inverse

          public MathTransform inverse()

      Returns the inverse of this math transform, which is the enclosing math transform.
      Specified by:
        `inverse` in interface `MathTransform`
      Overrides:
        `inverse` in class `AbstractMathTransform`
      Returns:
        the enclosing math transform.

    - #### isIdentity

          public boolean isIdentity()

      Tests whether this transform does not move any points. The default implementation delegates this tests to the enclosing math transform.
      Specified by:
        `isIdentity` in interface `MathTransform`
      Overrides:
        `isIdentity` in class `AbstractMathTransform`
      Returns:

    - #### computeHashCode

          protected int computeHashCode()

      Computes a hash value for this transform. This method is invoked by `AbstractMathTransform​.hashCode()` when first needed.
      Overrides:
        `computeHashCode` in class `AbstractMathTransform`
      Returns:
        the hash code value. This value may change between different execution of the Apache SIS library.

    - #### equals

          public boolean equals(Object object,
                                ComparisonMode mode)

      Compares the specified object with this inverse math transform for equality. The default implementation tests if `object` in an instance of the same class than `this`, and if so compares their enclosing `AbstractMathTransform`.
      Specified by:
        `equals` in interface `LenientComparable`
      Overrides:
        `equals` in class `AbstractMathTransform`
      Parameters:
        `object` - the object to compare with this transform.
        `mode` - the strictness level of the comparison. Default to `STRICT`.
      Returns:
        `true` if the given object is considered equals to this math transform.
      See Also:
        `Utilities​.deepEquals(Object, Object, ComparisonMode)`

    - #### formatTo

          protected String formatTo(Formatter formatter)

      Formats the inner part of a Well Known Text version 1 (WKT 1) element. If this inverse math transform has any parameter values, then this method formats the WKT as in the super-class method. Otherwise this method formats the math transform as an `"Inverse_MT"` entity.
      Compatibility note: `Param_MT` and `Inverse_MT` are defined in the WKT 1 specification only.
      Overrides:
        `formatTo` in class `AbstractMathTransform`
      Parameters:
        `formatter` - the formatter to use.
      Returns:
        the WKT element name, which is `"Param_MT"` or `"Inverse_MT"` in the default implementation.
      See Also:
        `FormattableObject​.toWKT()`, `FormattableObject​.toString()`

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.