T
- type of extension in this registrypublic abstract class BasePdpExtensionRegistry<T extends PdpExtension> extends Object implements PdpExtensionRegistry<T>
PdpExtensionRegistry
. This should be used as basis to implement (in a final class) an immutable PDP extension registry of a specific type. If you need
a generic immutable PDP extension registry, see {PdpExtensionRegistry.PdpExtensionComparator<E extends PdpExtension>
Modifier | Constructor and Description |
---|---|
protected |
BasePdpExtensionRegistry(Class<? super T> extensionClass,
Map<String,? extends T> extensionsById)
Instantiates immutable registry from a map.
|
protected |
BasePdpExtensionRegistry(Class<? super T> extensionClass,
Set<? extends T> extensions)
Instantiates immutable registry from a set of extensions
|
Modifier and Type | Method and Description |
---|---|
T |
getExtension(String identity)
Get an extension by ID.
|
Set<T> |
getExtensions()
Get extensions
|
String |
toString() |
protected BasePdpExtensionRegistry(Class<? super T> extensionClass, Map<String,? extends T> extensionsById)
extensionClass
- extension classextensionsById
- extensions input map; the registry actually creates and uses an immutable copy of this map internally to avoid external modifications on the internal mappublic final T getExtension(String identity)
getExtension
in interface PdpExtensionRegistry<T extends PdpExtension>
identity
- ID of extension to look uppublic final Set<T> getExtensions()
getExtensions
in interface PdpExtensionRegistry<T extends PdpExtension>
Copyright © 2012–2020. All rights reserved.