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
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidadd(I18nizableText label, T value) Adds a new entry.voidaddAll(Map<T, I18nizableText> entries) Adds new entries.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, waitMethods inherited from interface org.ametys.runtime.model.Enumerator
getConfiguration 
- 
Constructor Details
- 
StaticEnumerator
public StaticEnumerator() 
 - 
 - 
Method Details
- 
addAll
Adds new entries.- Parameters:
 entries- the entries to add
 - 
add
Adds a new entry.- Parameters:
 label- the entry label.value- the entry value.
 - 
getEntry
Description copied from interface:EnumeratorRetrieves a single label from a value.- Specified by:
 getEntryin interfaceEnumerator<T>- Parameters:
 value- the value.- Returns:
 - the label or 
nullif not found. 
 - 
getTypedEntries
Description copied from interface:EnumeratorProvides the enumerated values with their optional label.- Specified by:
 getTypedEntriesin interfaceEnumerator<T>- Returns:
 - the enumerated values and their label.
 
 
 -