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

Added in 1.4.0-rc02
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

Added in 1.4.0-rc02
public int hashCode()

toString

Added in 1.4.0-rc02
public @NonNull String toString()