SectionedItemList


@CarProtocol
public final class SectionedItemList


Represents an ItemList that is contained inside a section.

Summary

Public methods

static @NonNull SectionedItemList
create(@NonNull ItemList itemList, @NonNull CharSequence sectionHeader)

Creates an instance of a SectionedItemList with the given itemList and sectionHeader.

boolean
@NonNull CarText

Returns the title of the section.

@NonNull ItemList

Returns the ItemList for the section.

int
@NonNull String

Public methods

create

Added in 1.0.0
public static @NonNull SectionedItemList create(@NonNull ItemList itemList, @NonNull CharSequence sectionHeader)

Creates an instance of a SectionedItemList with the given itemList and sectionHeader.

Only DistanceSpans and DurationSpans are supported in the section header.

Throws
java.lang.IllegalArgumentException

if sectionHeader contains unsupported spans

equals

public boolean equals(@Nullable Object other)

getHeader

Added in 1.0.0
public @NonNull CarText getHeader()

Returns the title of the section.

getItemList

Added in 1.0.0
public @NonNull ItemList getItemList()

Returns the ItemList for the section.

hashCode

public int hashCode()

toString

public @NonNull String toString()