Interface Holders.Builder

All Superinterfaces:
GenericBuilder<Holders>
Enclosing interface:
Holders

public static interface Holders.Builder extends GenericBuilder<Holders>
Builder for the Holders object
Since:
2.9.3
  • Method Details

    • with

      Holders.Builder with(@NonNull Identifier identifier)
      Adds a new identifier to the Holders object. This will throw when a tag has been set, since a Holders object can consist of either a tag, or a list of identifiers, not both.
      Parameters:
      identifier - the identifier to add to the Holders object
      Returns:
      this builder
      Throws:
      IllegalArgumentException - when a tag has been set
      Since:
      2.9.3
    • tag

      Holders.Builder tag(@NonNull Identifier tag)
      Sets the tag of the Holders object. A Holders object can only consist of one tag. This will throw when at least one identifier has been added, since a Holders object can consist of either a tag, or a list of identifiers, not both.
      Parameters:
      tag - the tag to set
      Returns:
      this builder
      Throws:
      IllegalArgumentException - when at least one identifier has already been added
      Since:
      2.9.3
    • build

      Holders build()
      Creates the Holders object.
      Specified by:
      build in interface GenericBuilder<Holders>
      Returns:
      the new Holders object
      Since:
      2.9.3