Registry
final class Registry<T>
Package: dev.joid.lib.utils.registry · Module: core · Source: Registry.java
Ordered list of registered values in which the most recent registration wins.
Description
Section titled “Description”The registries of formats, resolvers, asset locators, markups, converters and key resolvers use it: a value registered later is tried first.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
| Registry() | Creates an empty registry. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
void | register(T value) | Puts value first; a value already registered moves to the front. |
void | unregister(T value) | Removes value. |
T | find(Predicate | Returns the first value, from the most recent, that matches predicate, or null. |
List<T> | getAll() | Returns the values from the most recent, read-only; the view follows the registrations. |
Creation details
Section titled “Creation details”Registry
Section titled “Registry”Registry()
Creates an empty registry.
Method details
Section titled “Method details”register
Section titled “register”void register(T value)
Puts value first; a value already registered moves to the front.
unregister
Section titled “unregister”void unregister(T value)
Removes value.
T find(Predicate<T> predicate)
Returns the first value, from the most recent, that matches predicate, or null.
getAll
Section titled “getAll”List<T> getAll()
Returns the values from the most recent, read-only; the view follows the registrations.
fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses
