Interface Creator<T>

All Superinterfaces:
Serializable

public interface Creator<T> extends Serializable
A constructor/factory, takes no parameters but creates a new value of type T every call. Supports throwing Exception in the create method, which the java.util.function.Supplier counterpart does not.
  • Method Summary

    Modifier and Type
    Method
    Description
    This method must return a different instance upon every call.
  • Method Details

    • create

      T create() throws Exception
      This method must return a different instance upon every call.
      Throws:
      Exception