org.bouncycastle.crypto.hash2curve.data

## Class AffineXY

- java.lang.Object
- - org.bouncycastle.crypto.hash2curve.data.AffineXY

-     public final class AffineXY
      extends java.lang.Object

  Simple holder for affine field coordinates.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AffineXY(java.math.BigInteger x, java.math.BigInteger y)` Constructs an `AffineXY` object representing the affine coordinates of an elliptic curve point.
    `AffineXY(ECPoint point)` Constructs an `AffineXY` object representing the affine coordinates of the provided elliptic curve point.
    `AffineXY(ECPoint point, boolean normalize)` Constructs an `AffineXY` object representing the affine coordinates of the provided elliptic curve point.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.math.BigInteger` | `getX()` Retrieves the x-coordinate of the affine point.
    `java.math.BigInteger` | `getY()` Retrieves the y-coordinate of the affine point.
    `ECPoint` | `toPoint(ECCurve curve)` Converts the affine coordinates of this object into an elliptic curve point on the specified curve.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AffineXY

          public AffineXY(java.math.BigInteger x,
                          java.math.BigInteger y)

      Constructs an `AffineXY` object representing the affine coordinates of an elliptic curve point.
      Parameters:
        `x` - the x-coordinate of the affine point
        `y` - the y-coordinate of the affine point

    - #### AffineXY

          public AffineXY(ECPoint point)

      Constructs an `AffineXY` object representing the affine coordinates of the provided elliptic curve point.
      Parameters:
        `point` - the elliptic curve point from which the affine coordinates will be extracted
      Throws:
        `java.lang.IllegalArgumentException` - if the provided point is at infinity

    - #### AffineXY

          public AffineXY(ECPoint point,
                          boolean normalize)

      Constructs an `AffineXY` object representing the affine coordinates of the provided elliptic curve point.
      Parameters:
        `point` - the elliptic curve point from which the affine coordinates will be extracted
        `normalize` - `true` if the point should be normalized before extracting coordinates, `false` otherwise
      Throws:
        `java.lang.IllegalArgumentException` - if the provided point is at infinity

  - ### Method Detail

    - #### toPoint

          public ECPoint toPoint(ECCurve curve)

      Converts the affine coordinates of this object into an elliptic curve point on the specified curve.
      Parameters:
        `curve` - the elliptic curve to which the point belongs
      Returns:
        an `ECPoint` object created using the affine coordinates of this object on the given curve

    - #### getX

          public java.math.BigInteger getX()

      Retrieves the x-coordinate of the affine point.
      Returns:
        the x-coordinate as a `BigInteger`

    - #### getY

          public java.math.BigInteger getY()

      Retrieves the y-coordinate of the affine point.
      Returns:
        the y-coordinate as a `BigInteger`