public class DayCareDurationRegistry
extends java.lang.Object
Constructor and Description |
---|
DayCareDurationRegistry() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.util.function.Supplier<DayCareDuration>> |
getAllDurations()
Gets all registered suppliers
|
static <T extends DayCareDuration> |
getDuration(java.lang.String id)
Attempts to get a new instance of a
DayCareDuration with the given ID |
static <T extends DayCareDuration> |
registerDuration(java.util.function.Supplier<T> t)
Register a new supplier for a given type of
DayCareDuration |
public static <T extends DayCareDuration> void registerDuration(java.util.function.Supplier<T> t)
DayCareDuration
T
- The type of durationt
- The supplier of the durationpublic static <T extends DayCareDuration> java.util.Optional<T> getDuration(java.lang.String id)
DayCareDuration
with the given IDT
- The type of durationid
- The type IDpublic static java.util.List<java.util.function.Supplier<DayCareDuration>> getAllDurations()