On this page

AbstractSupplier

public abstract class org.apache.commons.lang3.builder.AbstractSupplier<T, B extends AbstractSupplier<T, B, E>, E extends Throwable> implements FailableSupplier<T, E>[source]

Abstracts supplying an instance of T. Use to implement the builder pattern.

Parameters:
  • <T> – The type of results supplied by this supplier.

  • <B> – The type of builder.

  • <E> – The kind of thrown exception or error.

Since:

3.14.0

Constructors

AbstractSupplier()

Constructs a new instance.

public AbstractSupplier()[source]

Constructs a new instance.

Methods

asThis()

Returns this instance typed as the subclass type B.

@SuppressWarnings({"unchecked"}) protected B asThis()[source]

Returns this instance typed as the subclass type B.

This is the same as the expression:

(B) this
Returns:

this instance typed as the subclass type B.