Class InputFactory<V,I extends AbstractInput<V>>
- java.lang.Object
-
- me.nemo_64.betterinputs.api.util.registry.AbstractUnique
-
- me.nemo_64.betterinputs.api.input.InputFactory<V,I>
-
- All Implemented Interfaces:
IUnique
public abstract class InputFactory<V,I extends AbstractInput<V>> extends AbstractUnique
-
-
Constructor Summary
Constructors Constructor Description InputFactory(IPlatformKey key, Class<V> inputType)
Creates a new input factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I
build(IPlatformActor<?> actor, ArgumentMap map)
Creates a new input provider typeClass<V>
getInputType()
void
onUnregister()
This is called once this input factory is unregistered from the api-
Methods inherited from class me.nemo_64.betterinputs.api.util.registry.AbstractUnique
getKey
-
-
-
-
Constructor Detail
-
InputFactory
public InputFactory(IPlatformKey key, Class<V> inputType) throws NullPointerException
Creates a new input factory- Parameters:
key
- the key of the factoryinputType
- the input type of the input provider type- Throws:
NullPointerException
- if either thekey
orinputType
arenull
-
-
Method Detail
-
build
public final I build(IPlatformActor<?> actor, ArgumentMap map) throws NullPointerException, NotEnoughArgumentsException
Creates a new input provider type- Parameters:
actor
- the owning actor of the input provider typemap
- the parameters to create the input provider type- Returns:
- the input provider type
- Throws:
NullPointerException
- if either theactor
ormap
arenull
NotEnoughArgumentsException
- if the provided parameters were not enough for the input provider type
-
onUnregister
public void onUnregister()
This is called once this input factory is unregistered from the api
-
-