Package com.example.breeze_seas
Class TicketTabMapper
java.lang.Object
com.example.breeze_seas.TicketTabMapper
Minimal helper for classifying ticket states into Tickets tabs.
This keeps tab-mapping logic out of UI tests so it can be validated with plain JUnit.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTicket states that can be classified into the three Tickets tabs.static enumTarget tabs shown in the Tickets feature. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<TicketTabMapper.TicketState> Filters a list of ticket states down to only those that belong to the requested tab.static TicketTabMapper.TicketTabMaps a ticket state to the Tickets tab where it should appear.
-
Method Details
-
mapToTab
@NonNull public static TicketTabMapper.TicketTab mapToTab(@NonNull TicketTabMapper.TicketState state) Maps a ticket state to the Tickets tab where it should appear.- Parameters:
state- Ticket state being classified.- Returns:
- The tab that should contain the provided state.
-
filterStatesForTab
@NonNull public static List<TicketTabMapper.TicketState> filterStatesForTab(@NonNull List<TicketTabMapper.TicketState> states, @NonNull TicketTabMapper.TicketTab tab) Filters a list of ticket states down to only those that belong to the requested tab.- Parameters:
states- Ticket states to filter.tab- Target tab to keep.- Returns:
- A new list containing only states that belong to the requested tab.
-