Package org.openhab.core.common.registry
Class DefaultAbstractManagedProvider<E extends Identifiable<K>,K>
java.lang.Object
org.openhab.core.common.registry.AbstractProvider<E>
org.openhab.core.common.registry.AbstractManagedProvider<E,K,E>
org.openhab.core.common.registry.DefaultAbstractManagedProvider<E,K>
- Type Parameters:
E
- type of the elementK
- type of the element key
- All Implemented Interfaces:
ManagedProvider<E,
,K> Provider<E>
- Direct Known Subclasses:
ManagedItemChannelLinkProvider
@NonNullByDefault
public abstract class DefaultAbstractManagedProvider<@NonNull E extends Identifiable<@NonNull K>,@NonNull K>
extends AbstractManagedProvider<E,K,E>
DefaultAbstractManagedProvider
is a specific AbstractManagedProvider
implementation, where the stored
element is
the same as the element of the provider. So no transformation is needed.
Therefore only two generic parameters are needed instead of three.- Author:
- Dennis Nobel - Initial contribution
-
Field Summary
Fields inherited from class org.openhab.core.common.registry.AbstractManagedProvider
logger
Fields inherited from class org.openhab.core.common.registry.AbstractProvider
listeners
-
Constructor Summary
-
Method Summary
Methods inherited from class org.openhab.core.common.registry.AbstractManagedProvider
add, get, getAll, getStorageName, keyToString, remove, update
Methods inherited from class org.openhab.core.common.registry.AbstractProvider
addProviderChangeListener, notifyListenersAboutAddedElement, notifyListenersAboutRemovedElement, notifyListenersAboutUpdatedElement, removeProviderChangeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.openhab.core.common.registry.Provider
addProviderChangeListener, removeProviderChangeListener
-
Constructor Details
-
DefaultAbstractManagedProvider
-
-
Method Details
-
toElement
Description copied from class:AbstractManagedProvider
Converts the persistable element into the original element.- Specified by:
toElement
in classAbstractManagedProvider<E extends Identifiable<K>,
K, E extends Identifiable<K>> - Parameters:
key
- keyelement
- persistable element- Returns:
- original element
-
toPersistableElement
Description copied from class:AbstractManagedProvider
Converts the original element into an element that can be persisted.- Specified by:
toPersistableElement
in classAbstractManagedProvider<E extends Identifiable<K>,
K, E extends Identifiable<K>> - Parameters:
element
- original element- Returns:
- persistable element
-