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 Details

  • Method Details

    • addAll

      public void addAll(Map<T,I18nizableText> entries)
      Adds new entries.
      Parameters:
      entries - the entries to add
    • add

      public void add(I18nizableText label, T value)
      Adds a new entry.
      Parameters:
      label - the entry label.
      value - the entry value.
    • getEntry

      public I18nizableText getEntry(T value)
      Description copied from interface: Enumerator
      Retrieves a single label from a value.
      Specified by:
      getEntry in interface Enumerator<T>
      Parameters:
      value - the value.
      Returns:
      the label or null if not found.
    • getEntries

      Description copied from interface: Enumerator
      Provides the enumerated values with their optional label.
      Specified by:
      getEntries in interface Enumerator<T>
      Returns:
      the enumerated values and their label.