Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Fields](https://developer.android.com/reference/java/security/spec/ECPoint#lfields) \| [Ctors](https://developer.android.com/reference/java/security/spec/ECPoint#pubctors) \| [Methods](https://developer.android.com/reference/java/security/spec/ECPoint#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/java/security/spec/ECPoint#inhmethods)

# ECPoint


`
public


class
ECPoint
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | java.security.spec.ECPoint |

<br />

*** ** * ** ***

This immutable class represents a point on an elliptic curve (EC)
in affine coordinates. Other coordinate systems can
extend this class to represent this point in other
coordinates.

## Summary

| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/java/security/spec/ECPoint` | `https://developer.android.com/reference/java/security/spec/ECPoint#POINT_INFINITY` This defines the point at infinity. |

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/java/security/spec/ECPoint#ECPoint(java.math.BigInteger,%20java.math.BigInteger)(https://developer.android.com/reference/java/math/BigInteger x, https://developer.android.com/reference/java/math/BigInteger y) ` Creates an ECPoint from the specified affine x-coordinate `x` and affine y-coordinate `y`. |

| ### Public methods ||
|---|---|
| ` boolean` | ` https://developer.android.com/reference/java/security/spec/ECPoint#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Compares this elliptic curve point for equality with the specified object. |
| ` https://developer.android.com/reference/java/math/BigInteger` | ` https://developer.android.com/reference/java/security/spec/ECPoint#getAffineX()() ` Returns the affine x-coordinate `x`. |
| ` https://developer.android.com/reference/java/math/BigInteger` | ` https://developer.android.com/reference/java/security/spec/ECPoint#getAffineY()() ` Returns the affine y-coordinate `y`. |
| ` int` | ` https://developer.android.com/reference/java/security/spec/ECPoint#hashCode()() ` Returns a hash code value for this elliptic curve point. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Fields

### POINT_INFINITY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final ECPoint POINT_INFINITY
```

This defines the point at infinity.

<br />

## Public constructors

### ECPoint

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public ECPoint (BigInteger x, 
                BigInteger y)
```

Creates an ECPoint from the specified affine x-coordinate
`x` and affine y-coordinate `y`.

<br />

| Parameters ||
|---|---|
| `x` | `BigInteger`: the affine x-coordinate. <br /> |
| `y` | `BigInteger`: the affine y-coordinate. <br /> |

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/NullPointerException` | if `x` or `y` is null. |

## Public methods

### equals

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object obj)
```

Compares this elliptic curve point for equality with
the specified object.

<br />

| Parameters ||
|---|---|
| `obj` | `Object`: the object to be compared. <br /> |

| Returns ||
|---|---|
| `boolean` | true if `obj` is an instance of ECPoint and the affine coordinates match, false otherwise. <br /> |

### getAffineX

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BigInteger getAffineX ()
```

Returns the affine x-coordinate `x`.
Note: POINT_INFINITY has a null affine x-coordinate.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/math/BigInteger` | the affine x-coordinate. <br /> |

### getAffineY

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public BigInteger getAffineY ()
```

Returns the affine y-coordinate `y`.
Note: POINT_INFINITY has a null affine y-coordinate.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/math/BigInteger` | the affine y-coordinate. <br /> |

### hashCode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for this elliptic curve point.

<br />

| Returns ||
|---|---|
| `int` | a hash code value. <br /> |