Interface Builder<SELF extends Builder<SELF>>

Type Parameters:
SELF - The self type to be returned in all chain methods.

public interface Builder<SELF extends Builder<SELF>>
Base type for a builder.
Since:
1.0
Version:
1.0
API Note:
Be very careful when using this. SELF MUST be the type of the builder itself, or at least compatible with the return type of the chain builder methods, else it will cause an exception when assigned to a variable (and the compiler won't be able to warn about it).
  • Method Summary

    Modifier and Type
    Method
    Description
    default SELF
    Retrieves this cast to the self type.
  • Method Details

    • self

      @Deterministic default SELF self()
      Retrieves this cast to the self type.
      Returns:
      this.
      API Note:
      This does not check that the cast is valid. Make sure that SELF is set to the appropriate type.