Interface ILocationFactory<T,L extends ILocation>

Type Parameters:
T - The type of location.
L - The location type.
All Superinterfaces:
IFactory<T,L>
All Known Implementing Classes:
EntityLocation.Factory, StaticLocation.Factory

public interface ILocationFactory<T,L extends ILocation> extends IFactory<T,L>
Marker interface used to specify a factory for locations. Restricts the output type of the general factory interface to ILocation
  • Method Details

    • getNewInstance

      @NotNull default L getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull T t, @NotNull @NotNull Object... context) throws IllegalArgumentException
      Method to get a new instance of the output given the input and additional context data.
      Specified by:
      getNewInstance in interface IFactory<T,L extends ILocation>
      Parameters:
      factoryController - The IFactoryController that called this factory method.
      t - The input to build a new output for.
      context - The context of the location.
      Returns:
      The new output instance for a given input.
      Throws:
      IllegalArgumentException - is thrown when the factory cannot produce a new instance out of the given context and input.
    • getNewInstance

      @NotNull L getNewInstance(@NotNull @NotNull IFactoryController factoryController, @NotNull T input)
      Method to get a new instance of a location given the input.
      Parameters:
      factoryController - The IFactoryController that called this factory method.
      input - The input to build a new location for.
      Returns:
      The new output instance for a given input.