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
 
 public class StaticEnumerator<T> extends Object implements Enumerator<T> This implementation enumerate the static configured elements
- 
- 
Constructor SummaryConstructors Constructor Description StaticEnumerator()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(I18nizableText label, T value)Adds a new entry.I18nizableTextgetEntry(T value)Retrieves a single label from a value.Map<T,I18nizableText>getTypedEntries()Provides the enumerated values with their optional label.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.ametys.runtime.model.EnumeratorgetConfiguration
 
- 
 
- 
- 
- 
Constructor Detail- 
StaticEnumeratorpublic StaticEnumerator() 
 
- 
 - 
Method Detail- 
addpublic void add(I18nizableText label, T value) Adds a new entry.- Parameters:
- label- the entry label.
- value- the entry value.
 
 - 
getEntrypublic I18nizableText getEntry(T value) Description 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.
 
 - 
getTypedEntriespublic Map<T,I18nizableText> getTypedEntries() Description copied from interface:EnumeratorProvides the enumerated values with their optional label.- Specified by:
- getTypedEntriesin interface- Enumerator<T>
- Returns:
- the enumerated values and their label.
 
 
- 
 
-