Package org.ametys.runtime.model
Class StaticEnumerator<T>
java.lang.Object
org.ametys.runtime.model.StaticEnumerator<T>
- Type Parameters:
T
- Type of the values
- All Implemented Interfaces:
Enumerator<T>
- Direct Known Subclasses:
MergePolicy.MergePolicyEnumerator
This implementation enumerate the static configured elements
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(I18nizableText label, T value) Adds a new entry.Retrieves a single label from a value.Provides the enumerated values with their optional label.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.runtime.model.Enumerator
getConfiguration
-
Constructor Details
-
StaticEnumerator
public StaticEnumerator()
-
-
Method Details
-
add
Adds a new entry.- Parameters:
label
- the entry label.value
- the entry value.
-
getEntry
Description copied from interface:Enumerator
Retrieves a single label from a value.- Specified by:
getEntry
in interfaceEnumerator<T>
- Parameters:
value
- the value.- Returns:
- the label or
null
if not found.
-
getTypedEntries
Description copied from interface:Enumerator
Provides the enumerated values with their optional label.- Specified by:
getTypedEntries
in interfaceEnumerator<T>
- Returns:
- the enumerated values and their label.
-