Section.BaseBuilder


protected abstract class Section.BaseBuilder<T extends Item, B>

Known direct subclasses
GridSection.Builder

A builder that constructs GridSection instances.

RowSection.Builder

A builder that constructs RowSection instances.


Generic Section builder that contains the fields that all sections share.

Parameters
<T extends Item>

The Item type that this section contains

<B>

The builder type to return for the builder methods

Summary

Protected constructors

Public methods

@NonNull B

Adds an item to this section, appending to the existing list of items.

@NonNull B

Delete all items in this section.

@NonNull B

Sets the items for this section, overwriting any other previously set items.

@NonNull B

Sets or clears the optional message to display in this section when there are 0 items added to it.

@NonNull B

Sets or clears the optional message to display in this section when there are 0 items added to it.

@NonNull B

Sets or clears the optional title that appears above the items in this section.

@NonNull B

Sets or clears the optional title that appears above the items in this section.

Protected constructors

BaseBuilder

Added in 1.7.0-beta02
protected BaseBuilder()

Public methods

addItem

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNulladdItem(@NonNull T item)

Adds an item to this section, appending to the existing list of items.

clearItems

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullclearItems()

Delete all items in this section.

setItems

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullsetItems(@NonNull List<T> items)

Sets the items for this section, overwriting any other previously set items.

setNoItemsMessage

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullsetNoItemsMessage(@Nullable CarText noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it. If not set, this section will not show any message when there are 0 items. The message must conform to TEXT_ONLY constraints.

setNoItemsMessage

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullsetNoItemsMessage(@Nullable CharSequence noItemsMessage)

Sets or clears the optional message to display in this section when there are 0 items added to it. If not set, this section will not show any message when there are 0 items. The message must conform to TEXT_ONLY constraints.

setTitle

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullsetTitle(@Nullable CarText title)

Sets or clears the optional title that appears above the items in this section. If not set, no title shows up. The title must conform to TEXT_ONLY constraints.

setTitle

Added in 1.7.0-beta02
@CanIgnoreReturnValue
public @NonNullsetTitle(@Nullable CharSequence title)

Sets or clears the optional title that appears above the items in this section. If not set, no title shows up. The title must conform to TEXT_ONLY constraints.