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 SummaryConstructors
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.runtime.model.EnumeratorgetConfiguration
- 
Constructor Details- 
StaticEnumeratorpublic StaticEnumerator()
 
- 
- 
Method Details- 
addAllAdds new entries.- Parameters:
- entries- the entries to add
 
- 
addAdds a new entry.- Parameters:
- label- the entry label.
- value- the entry value.
 
- 
getEntryDescription copied from interface:EnumeratorRetrieves a single label from a value.- Specified by:
- getEntryin interface- Enumerator<T>
- Parameters:
- value- the value.
- Returns:
- the label or nullif not found.
 
- 
getTypedEntriesDescription copied from interface:EnumeratorProvides the enumerated values with their optional label.- Specified by:
- getTypedEntriesin interface- Enumerator<T>
- Returns:
- the enumerated values and their label.
 
 
-