Class FlagMap<K>

Type Parameters:
K - key value as String of Integer
All Implemented Interfaces:
Serializable, Cloneable, Map<K,Boolean>

public class FlagMap<K> extends SMap<K,Boolean>
Flag map, i.e. a map of boolean values
Author:
hmorel
See Also:
  • Constructor Details

    • FlagMap

      public FlagMap(SMEntry<K,Boolean>... flagEntries)
    • FlagMap

      public FlagMap(FlagMap<K> source, SMEntry<K,Boolean>... flagEntries)
      construct a new Flag Map by adding to an input one a list of flag entries
      Parameters:
      source -
      flagEntries - complement flag list
  • Method Details

    • build

      public static <K> FlagMap build(K... entries)
    • build

      public static <K> FlagMap build(List<K> entries)
    • selected

      public boolean selected(K key)
    • isSelected

      public static <K> boolean isSelected(FlagMap<K> source, K key)
      test if an input key is selected or not
      Type Parameters:
      K - type of the map
      Parameters:
      source - map to be tested
      key - input key
      Returns:
      true if the key is selected
    • add

      public void add(SMEntry<K,Boolean> entry)
    • getSelected

      public ArrayList<K> getSelected()