Package monq.jfa

Class PrioritizedValueMerger<T>

java.lang.Object
monq.jfa.PrioritizedValueMerger<T>
All Implemented Interfaces:
StateValueMerger<T>

public class PrioritizedValueMerger<T> extends Object implements StateValueMerger<T>
  • Constructor Details

  • Method Details

    • merge

      public T merge(List<T> values) throws CompileDfaException
      Description copied from interface: StateValueMerger
      Should derive a value V from the values provided. The result may be one of the values provided or a newly created one. Changing one of the provided values is most likely not what you should do.

      The result of the method should not depend on the order of the values. The parameter is not a Set mainly because this would require that values behave sanely as set members (hashCode, equals).

      Specified by:
      merge in interface StateValueMerger<T>
      Parameters:
      values - is guaranteed to contain at least two values
      Returns:
      should never be null
      Throws:
      CompileDfaException - if no useful value can be determined