Package org.dellroad.stuff.vaadin24.data
Class EnumDataProvider<T extends Enum<T>>
java.lang.Object
com.vaadin.flow.data.provider.AbstractDataProvider<T,SerializablePredicate<T>>
com.vaadin.flow.data.provider.ListDataProvider<T>
org.dellroad.stuff.vaadin24.data.EnumDataProvider<T>
- All Implemented Interfaces:
ConfigurableFilterDataProvider<T,
,SerializablePredicate<T>, SerializablePredicate<T>> DataProvider<T,
,SerializablePredicate<T>> InMemoryDataProvider<T>
,Serializable
A simple data provider containing
Enum
values.
When created by a FieldBuilder
, instances will
automatically infer the Enum
type via FieldBuilderContext.inferDataModelType()
and then
populate themselves with the corresponding enum values.
- See Also:
-
Constructor Summary
-
Method Summary
Methods inherited from class com.vaadin.flow.data.provider.ListDataProvider
fetch, getFilter, getItems, getSortComparator, setFilter, setSortComparator, size
Methods inherited from class com.vaadin.flow.data.provider.AbstractDataProvider
addDataProviderListener, addListener, fireEvent, refreshAll, refreshItem, refreshItem
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.data.provider.DataProvider
addDataProviderListener, getId, refreshAll, refreshItem, refreshItem, withConfigurableFilter, withConfigurableFilter, withConvertedFilter
Methods inherited from interface com.vaadin.flow.data.provider.InMemoryDataProvider
addFilter, addFilter, addFilterByValue, addSortComparator, addSortOrder, clearFilters, filteringBy, filteringBy, filteringByEquals, filteringByPrefix, filteringByPrefix, filteringBySubstring, filteringBySubstring, isInMemory, setFilter, setFilterByValue, setSortOrder
-
Constructor Details
-
EnumDataProvider
Auto-build Constructor.This constructor will infer the
Enum
type from the annotated method's return value.- Parameters:
ctx
- field builder context- Throws:
NullPointerException
- ifctx
is null
-
EnumDataProvider
Constructor.- Parameters:
type
- enum type- Throws:
IllegalArgumentException
- iftype
is nullClassCastException
- iftype
is not anEnum
type
-
-
Method Details
-
getEnumType
Get the enum type.- Returns:
- enum type
-