Class IdRequiredDataBuilder<T extends GenericDataBuilder<T,​K>,​K>

  • Type Parameters:
    T - The data builder type.
    K - The data type.

    public final class IdRequiredDataBuilder<T extends GenericDataBuilder<T,​K>,​K>
    extends java.lang.Object
    Temporary data builder that requires an ID supplier to be set. This is typically used as the first level of a data builder to ensure that the caller specifies the ID field value as required by the ComponentData interface.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T withId​(@NotNull java.util.function.Supplier<@NotNull java.lang.String> supplier)
      Set the supplier that supplies the component's ID.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withId

        @NotNull
        public T withId​(@NotNull
                        @NotNull java.util.function.Supplier<@NotNull java.lang.String> supplier)
        Set the supplier that supplies the component's ID.
        Parameters:
        supplier - The ID value supplier.
        Returns:
        A new data builder.
        See Also:
        ComponentData.getId(), AssetData.getId()