Class SingleValueOrContextCollector<T>
- java.lang.Object
-
- org.kie.dmn.feel.runtime.decisiontables.SingleValueOrContextCollector<T>
-
- All Implemented Interfaces:
java.util.stream.Collector<T,java.util.List<T>,java.lang.Object>
public class SingleValueOrContextCollector<T> extends java.lang.Object implements java.util.stream.Collector<T,java.util.List<T>,java.lang.Object>Custom DT collector: it only 1 output, return the output itself. If more than 1 output, return a FEEL Context (hashmap) with name of the output and its value. From the specs: The output expression of a rule in a single output decision table is simply the rule's output entry. The output expression of a multiple output decision table is a context with entries composed from the output names and the rule's corresponding output entries.
-
-
Constructor Summary
Constructors Constructor Description SingleValueOrContextCollector(java.util.List<java.lang.String> outputNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.function.BiConsumer<java.util.List<T>,T>accumulator()java.util.Set<java.util.stream.Collector.Characteristics>characteristics()java.util.function.BinaryOperator<java.util.List<T>>combiner()java.util.function.Function<java.util.List<T>,java.lang.Object>finisher()java.util.function.Supplier<java.util.List<T>>supplier()
-
-
-
Method Detail
-
supplier
public java.util.function.Supplier<java.util.List<T>> supplier()
-
combiner
public java.util.function.BinaryOperator<java.util.List<T>> combiner()
-
finisher
public java.util.function.Function<java.util.List<T>,java.lang.Object> finisher()
-
-