Interface Builder<G,B extends Builder<G,B>>

Type Parameters:
G - The type of Object to build
B - The Builder type
All Known Implementing Classes:
BaseCanvasGUIBuilder, BaseChestGUIBuilder, BaseGUIBuilder, BaseGUIButtonBuilder, BaseGUIItemBuilder, BaseGUIPaneBuilder, BaseGUISectionBuilder, CanvasGUIBuilder, ChestGUIBuilder, GUIButtonBuilder, GUIItemBuilder, HorizontalSplitGUIPaneBuilder, PaginatorBuilder, SimpleGUIPaneBuilder, SimpleItemGUIPaneBuilder, SubmitGUIButtonBuilder

public interface Builder<G,B extends Builder<G,B>>
Interface for creating Builders
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    This Exception gets called if there are missing values when building the object
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the object
    default <T> T
    getValue(Supplier<T> location)
    Gets a value from a supplier
    default <T> T
    getValue(List<Supplier<T>> locations)
    Returns the first non-null value
    default <T> T
    getValue(T value)
    Returns a value if not null
  • Field Details

    • VALUE_MISSING_EXCEPTION

      static final IllegalStateException VALUE_MISSING_EXCEPTION
      This Exception gets called if there are missing values when building the object
  • Method Details

    • build

      G build()
      Builds the object
      Returns:
      The built object
    • getValue

      default <T> T getValue(Supplier<T> location)
      Gets a value from a supplier
      Type Parameters:
      T - The type of value
      Parameters:
      location - The supplier
      Returns:
      The value
    • getValue

      default <T> T getValue(T value)
      Returns a value if not null
      Type Parameters:
      T - The type of value
      Parameters:
      value - The value
      Returns:
      The value
    • getValue

      default <T> T getValue(List<Supplier<T>> locations)
      Returns the first non-null value
      Type Parameters:
      T - The type of the values
      Parameters:
      locations - The values
      Returns:
      The value