    public abstract class FactoryProvider<I> implements Comparable<FactoryProvider<?>>

A base class for service factory creation that can be registered with the ProviderRegistry.

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> FactoryProvider\<I\>

## Implements

[Comparable\<FactoryProvider\<?\>\>](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable<com/google/appengine/spi/FactoryProvider<)

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

| ## Type Parameter ||
|---|---|
| **Name** | **Description** |
| `I` |   |

## Constructors

### FactoryProvider(Class\<I\> baseInterface)

    protected FactoryProvider(Class<I> baseInterface)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `baseInterface` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<I>` |

## Methods

### compareTo(FactoryProvider\<?\> o)

    public int compareTo(FactoryProvider<?> o)

This ensures that a list of these will be sorted so that higher precedence entries come later
in the list.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `o` | `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.spi.FactoryProvider<?>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### equals(Object o)

    public boolean equals(Object o)

Included to support sorting by precedence (@see #compareTo(FactoryProvider))

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `o` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)

### getBaseInterface()

    protected Class<I> getBaseInterface()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<I>` |   |

### getFactoryInstance()

    protected abstract I getFactoryInstance()

Return an instance of the factory

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `I` |   |

### hashCode()

    public int hashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)