Interface ComponentContext<E extends Element, B extends TypedBuilder<E,B>>
- Type Parameters:
E- the type of the element representing the componentB- the type of the builder used to build the component
- All Superinterfaces:
IsElement<E>, TypedBuilder<E,B>
- All Known Implementing Classes:
AccordionItem, ActionListGroup, ActionListItem, Alert, BreadcrumbItem, Cell, DataListItem, DescriptionListGroup, FinderColumn, FinderItem, FormGroup, JumpLinksItem, Label, ListItem, MenuItem, NavigationItem, NotificationDrawerItem, SimpleListItem, Tab, TabContent, Td, Th, TitleCell, ToggleGroupItem, ToolbarItem, Tr, TreeViewItem, WizardContext, WizardNavItem, WizardStep
public interface ComponentContext<E extends Element, B extends TypedBuilder<E,B>>
extends TypedBuilder<E,B>, IsElement<E>
The ComponentContext interface represents a context for a component, providing methods to store and retrieve arbitrary values
associated with keys.
-
Method Summary
Modifier and TypeMethodDescription<T> TRetrieves the value associated with the given key from the ComponentContext.default <T> TRetrieves the value associated with the given key from the ComponentContext.default <T> TRetrieves the value associated with the given key from the ComponentContext.booleanDetermines whether a value is stored with the specified key.<T> BStores a value associated with a key.Methods inherited from interface TypedBuilder
that
-
Method Details
-
store
-
has
Determines whether a value is stored with the specified key.- Parameters:
key- the key to check- Returns:
- true if a value is stored with the specified key, false otherwise
-
get
Retrieves the value associated with the given key from the ComponentContext.- Type Parameters:
T- the type of the value being retrieved- Parameters:
key- the key associated with the value- Returns:
- the value associated with the key, or null if no value is found
-
get
Retrieves the value associated with the given key from the ComponentContext.- Type Parameters:
T- the type of the value being retrieved- Parameters:
key- the key associated with the valuedefaultValue- the default value to be returned if no value is found with the specified key- Returns:
- the value associated with the key, or the defaultValue if no value is found
-
get
Retrieves the value associated with the given key from the ComponentContext.- Type Parameters:
T- the type of the value being retrieved- Parameters:
key- the key associated with the valuedefaultValue- the default value to be returned if no value is found with the specified key- Returns:
- the value associated with the key, or the defaultValue if no value is found
-